diff options
Diffstat (limited to 'system/libraries/Typography.php')
-rw-r--r-- | system/libraries/Typography.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/system/libraries/Typography.php b/system/libraries/Typography.php index 2393e164e..0ee6a24d0 100644 --- a/system/libraries/Typography.php +++ b/system/libraries/Typography.php @@ -290,7 +290,10 @@ class CI_Typography { $str = preg_replace("/([^\n])(\n)([^\n])/", "\\1<br />\\2\\3", $str); // Wrap the whole enchilada in enclosing paragraphs - $str = '<p>'.$str.'</p>'; + if ($str != "\n") + { + $str = '<p>'.$str.'</p>'; + } // Remove empty paragraphs if they are on the first line, as this // is a potential unintended consequence of the previous code |