1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-05 00:07:44 +02:00

- 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
This commit is contained in:
Meik Sievertsen
2008-02-23 15:29:38 +00:00
parent 2092f07c54
commit 7ea118198e
2 changed files with 4 additions and 2 deletions

View File

@@ -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(?:="(.*?)")?$#is', $buffer, $m))
else if (preg_match('#^quote(?:="(.*?)")?$#is', $buffer, $m) && substr($out, -1, 1) == '[')
{
$this->parsed_items['quote']++;