aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/bbcode.php
diff options
context:
space:
mode:
authorNils Adermann <naderman@naderman.de>2007-10-07 10:34:45 +0000
committerNils Adermann <naderman@naderman.de>2007-10-07 10:34:45 +0000
commitff509e3a036a75f03c975f5b8adedc0a1f639b4f (patch)
tree68ae42e486ffc659c8fda4b309e107ff92627042 /phpBB/includes/bbcode.php
parent26cb8253142997efeaeb6b96d16ec97eb237644f (diff)
downloadforums-ff509e3a036a75f03c975f5b8adedc0a1f639b4f.tar
forums-ff509e3a036a75f03c975f5b8adedc0a1f639b4f.tar.gz
forums-ff509e3a036a75f03c975f5b8adedc0a1f639b4f.tar.bz2
forums-ff509e3a036a75f03c975f5b8adedc0a1f639b4f.tar.xz
forums-ff509e3a036a75f03c975f5b8adedc0a1f639b4f.zip
- Match custom BBCodes in the same way during first and second pass - patch provided by IBBoard [Bug #14268]
git-svn-id: file:///svn/phpbb/trunk@8153 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/bbcode.php')
-rw-r--r--phpBB/includes/bbcode.php9
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('&#58;', '&#46;'), array(':', '.'), $message);
+ $undid_bbcode_specialchars = true;
+ }
+
$message = preg_replace($preg['search'], $preg['replace'], $message);
$preg = array('search' => array(), 'replace' => array());
}