aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/message_parser.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2007-06-03 18:47:05 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2007-06-03 18:47:05 +0000
commit498b87df106597c4d7bf236561fa76e99eeeb30f (patch)
tree48e2c0771e82767f7b4b7bda3abe934b848fce4c /phpBB/includes/message_parser.php
parent33340b3d78cc3cec083f5bdc8412b972599ecd05 (diff)
downloadforums-498b87df106597c4d7bf236561fa76e99eeeb30f.tar
forums-498b87df106597c4d7bf236561fa76e99eeeb30f.tar.gz
forums-498b87df106597c4d7bf236561fa76e99eeeb30f.tar.bz2
forums-498b87df106597c4d7bf236561fa76e99eeeb30f.tar.xz
forums-498b87df106597c4d7bf236561fa76e99eeeb30f.zip
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
Diffstat (limited to 'phpBB/includes/message_parser.php')
-rw-r--r--phpBB/includes/message_parser.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/phpBB/includes/message_parser.php b/phpBB/includes/message_parser.php
index b8f00d71ee..97077980c9 100644
--- a/phpBB/includes/message_parser.php
+++ b/phpBB/includes/message_parser.php
@@ -447,7 +447,6 @@ class bbcode_firstpass extends bbcode
unset($htm_match[4], $htm_match[5]);
$htm_replace = array('\1', '\1', '\2', '\1');
- $in = preg_replace($htm_match, $htm_replace, $in);
$out = $code_block = '';
$open = 1;
@@ -488,6 +487,7 @@ class bbcode_firstpass extends bbcode
if ($open == 1)
{
$code_block .= substr($in, 0, $pos2);
+ $code_block = preg_replace($htm_match, $htm_replace, $code_block);
// Parse this code block
$out .= $this->bbcode_parse_code($stx, $code_block);
@@ -514,6 +514,8 @@ class bbcode_firstpass extends bbcode
if ($code_block)
{
$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);
}