- 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

@ -127,6 +127,7 @@
<li>[Change] Use correct string for filesize (MiB instead of MB for example)</li>
<li>[Change] Remove left join for query used to retrieve already assigned users and groups within permission panel (Bug #20235)</li>
<li>[Fix] Correctly return sole whitespaces if used with BBCodes (Bug #19535)</li>
<li>[Fix] Quote bbcode parsing adding too much closing tags on special conditions (Bug #20735)</li>
</ul>
<a name="v30rc8"></a><h3>1.i. Changes since 3.0.RC8</h3>

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