diff options
Diffstat (limited to 'phpBB/includes/bbcode.php')
-rw-r--r-- | phpBB/includes/bbcode.php | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/phpBB/includes/bbcode.php b/phpBB/includes/bbcode.php index 6610a5c441..ef73762582 100644 --- a/phpBB/includes/bbcode.php +++ b/phpBB/includes/bbcode.php @@ -80,6 +80,7 @@ class bbcode $bitfield = new bitfield($this->bbcode_bitfield); $bbcodes_set = $bitfield->get_all_set(); + $undid_bbcode_specialchars = false; foreach ($bbcodes_set as $bbcode_id) { if (!empty($this->bbcode_cache[$bbcode_id])) @@ -100,6 +101,14 @@ class bbcode if (sizeof($preg['search'])) { + // we need to turn the entities back into their original form to allow the + // search patterns to work properly + if (!$undid_bbcode_specialchars) + { + $message = str_replace(array(':', '.'), array(':', '.'), $message); + $undid_bbcode_specialchars = true; + } + $message = preg_replace($preg['search'], $preg['replace'], $message); $preg = array('search' => array(), 'replace' => array()); } |