diff options
author | Rick Ellis <rick.ellis@ellislab.com> | 2008-10-22 22:17:21 +0200 |
---|---|---|
committer | Rick Ellis <rick.ellis@ellislab.com> | 2008-10-22 22:17:21 +0200 |
commit | c95c7e9c10efea460b8c4ce03e3be241817625d3 (patch) | |
tree | d369aa6017c7c384b048a48b7d7f5745242741a6 /system/libraries/Typography.php | |
parent | 862545a5adb76df0393022b3506eb203c9a543d7 (diff) |
Fixed a nexted <li> bug
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 |