mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-01 14:30:32 +02:00
- 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
This commit is contained in:
@@ -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());
|
||||
}
|
||||
|
Reference in New Issue
Block a user