summaryrefslogtreecommitdiffstats
path: root/system/libraries/Typography.php
diff options
context:
space:
mode:
authorDerek Jones <derek.jones@ellislab.com>2008-12-11 17:37:04 +0100
committerDerek Jones <derek.jones@ellislab.com>2008-12-11 17:37:04 +0100
commitffa4c84a3136ece9a25a40daad1194047da8fce4 (patch)
tree2b2c77f9cdbfda3dd08b5aecb78218c92ea1b861 /system/libraries/Typography.php
parent7deecfbdc0b3b17d806fb0bb7a1b7f83df34dcd5 (diff)
fixed &nbsp; cleanup preceding block elements, regex was using [] instead of ()
Diffstat (limited to 'system/libraries/Typography.php')
-rw-r--r--system/libraries/Typography.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/system/libraries/Typography.php b/system/libraries/Typography.php
index 0c4a978aa..a4d1e3548 100644
--- a/system/libraries/Typography.php
+++ b/system/libraries/Typography.php
@@ -196,9 +196,9 @@ class CI_Typography {
// Clean up stray paragraph tags that appear before block level elements
'#<p></p><('.$this->block_elements.')#' => '<$1',
-
+
// Clean up stray non-breaking spaces preceeding block elements
- '#[&nbsp; ]+<('.$this->block_elements.')#' => ' <$1',
+ '#(&nbsp;\s*)+<('.$this->block_elements.')#' => ' <$2',
// Replace the temporary markers we added earlier
'/\{@TAG\}/' => '<',