mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-12 06:18:52 +00:00
do not strip our pre-parsed text if it is outside or between code blocks
git-svn-id: file:///svn/phpbb/trunk@7712 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
parent
33340b3d78
commit
498b87df10
1 changed files with 3 additions and 1 deletions
|
@ -447,7 +447,6 @@ class bbcode_firstpass extends bbcode
|
||||||
unset($htm_match[4], $htm_match[5]);
|
unset($htm_match[4], $htm_match[5]);
|
||||||
$htm_replace = array('\1', '\1', '\2', '\1');
|
$htm_replace = array('\1', '\1', '\2', '\1');
|
||||||
|
|
||||||
$in = preg_replace($htm_match, $htm_replace, $in);
|
|
||||||
$out = $code_block = '';
|
$out = $code_block = '';
|
||||||
$open = 1;
|
$open = 1;
|
||||||
|
|
||||||
|
@ -488,6 +487,7 @@ class bbcode_firstpass extends bbcode
|
||||||
if ($open == 1)
|
if ($open == 1)
|
||||||
{
|
{
|
||||||
$code_block .= substr($in, 0, $pos2);
|
$code_block .= substr($in, 0, $pos2);
|
||||||
|
$code_block = preg_replace($htm_match, $htm_replace, $code_block);
|
||||||
|
|
||||||
// Parse this code block
|
// Parse this code block
|
||||||
$out .= $this->bbcode_parse_code($stx, $code_block);
|
$out .= $this->bbcode_parse_code($stx, $code_block);
|
||||||
|
@ -514,6 +514,8 @@ class bbcode_firstpass extends bbcode
|
||||||
if ($code_block)
|
if ($code_block)
|
||||||
{
|
{
|
||||||
$code_block = substr($code_block, 0, -7);
|
$code_block = substr($code_block, 0, -7);
|
||||||
|
$code_block = preg_replace($htm_match, $htm_replace, $code_block);
|
||||||
|
|
||||||
$out .= $this->bbcode_parse_code($stx, $code_block);
|
$out .= $this->bbcode_parse_code($stx, $code_block);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue