1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-06-04 05:25:01 +02:00

trimmed down the quote bug fix in second pass to one preg_replace rather than two, by changing the pattern up a bit...

git-svn-id: file:///svn/phpbb/trunk@1822 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
the_systech 2002-01-08 19:00:28 +00:00
parent e11937ae9c
commit 3e0104a714

View File

@ -167,10 +167,9 @@ function bbencode_second_pass($text, $uid)
$text = str_replace("[quote:$uid]", $bbcode_tpl['quote_open'], $text);
$text = str_replace("[/quote:$uid]", $bbcode_tpl['quote_close'], $text);
// Do this line first to catch "quoted" usernames
$text = preg_replace("/\[quote:$uid=\"(.*?)\"\]/si", $bbcode_tpl['quote_username_open'], $text);
// Then do this line to catch the old style unquoted usernames..
$text = preg_replace("/\[quote:$uid=(.*?)\]/si", $bbcode_tpl['quote_username_open'], $text);
// New one liner to deal with opening quotes with usernames...
// replaces the two line version that I had here before..
$text = preg_replace("/\[quote:$uid=(?:\"?([^\"]*)\"?)\]/si", $bbcode_tbl['quote_username_open'], $text);
// [b] and [/b] for bolding text.
$text = str_replace("[b:$uid]", $bbcode_tpl['b_open'], $text);