From 3e0104a714eabecfc78c44ba9ac1c31ede47c57b Mon Sep 17 00:00:00 2001 From: the_systech Date: Tue, 8 Jan 2002 19:00:28 +0000 Subject: [PATCH] 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 --- phpBB/includes/bbcode.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/phpBB/includes/bbcode.php b/phpBB/includes/bbcode.php index cb96937e0f..2ad605c9eb 100644 --- a/phpBB/includes/bbcode.php +++ b/phpBB/includes/bbcode.php @@ -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);