aboutsummaryrefslogtreecommitdiffstats
path: root/phpBB/includes/message_parser.php
diff options
context:
space:
mode:
authorMeik Sievertsen <acydburn@phpbb.com>2008-02-23 15:29:38 +0000
committerMeik Sievertsen <acydburn@phpbb.com>2008-02-23 15:29:38 +0000
commit7ea118198e3af9f6ff97c883a75b38bef2fc3881 (patch)
treec09b8ce77e69690aa81447d3cff2caf72b26853c /phpBB/includes/message_parser.php
parent2092f07c544b0a44aba085216eeadc84be5cec5d (diff)
downloadforums-7ea118198e3af9f6ff97c883a75b38bef2fc3881.tar
forums-7ea118198e3af9f6ff97c883a75b38bef2fc3881.tar.gz
forums-7ea118198e3af9f6ff97c883a75b38bef2fc3881.tar.bz2
forums-7ea118198e3af9f6ff97c883a75b38bef2fc3881.tar.xz
forums-7ea118198e3af9f6ff97c883a75b38bef2fc3881.zip
- Fix quote bbcode parsing adding too much closing tags on special conditions - #20735
git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@8393 89ea8834-ac86-4346-8a33-228a782c2dd0
Diffstat (limited to 'phpBB/includes/message_parser.php')
-rw-r--r--phpBB/includes/message_parser.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/phpBB/includes/message_parser.php b/phpBB/includes/message_parser.php
index e78fc271a6..41e7bc51d7 100644
--- a/phpBB/includes/message_parser.php
+++ b/phpBB/includes/message_parser.php
@@ -684,7 +684,8 @@ class bbcode_firstpass extends bbcode
* #14667 - [quote]test[/quote] test ] and [ test [quote]test[/quote] (correct: parsed)
* #14770 - [quote="["]test[/quote] (correct: parsed)
* [quote="[i]test[/i]"]test[/quote] (correct: parsed)
- * [quote="[quote]test[/quote]"]test[/quote] (correct: NOT parsed)
+ * [quote="[quote]test[/quote]"]test[/quote] (correct: parsed - Username displayed as [quote]test[/quote])
+ * #20735 - [quote]test[/[/b]quote] test [/quote][/quote] test - (correct: quoted: "test[/[/b]quote] test" / non-quoted: "[/quote] test" - also failed if layout distorted)
*/
$in = str_replace("\r\n", "\n", str_replace('\"', '"', trim($in)));
@@ -737,7 +738,7 @@ class bbcode_firstpass extends bbcode
$out .= ' ';
}*/
}
- else if (preg_match('#^quote(?:=&quot;(.*?)&quot;)?$#is', $buffer, $m))
+ else if (preg_match('#^quote(?:=&quot;(.*?)&quot;)?$#is', $buffer, $m) && substr($out, -1, 1) == '[')
{
$this->parsed_items['quote']++;