diff options
author | the_systech <the_systech@users.sourceforge.net> | 2002-01-08 19:00:28 +0000 |
---|---|---|
committer | the_systech <the_systech@users.sourceforge.net> | 2002-01-08 19:00:28 +0000 |
commit | 3e0104a714eabecfc78c44ba9ac1c31ede47c57b (patch) | |
tree | 189f941739a60cd7182cf9dbad271ff81ad24d51 /phpBB/includes/bbcode.php | |
parent | e11937ae9c8aea98c4ed716785f4068bda0efa1a (diff) | |
download | forums-3e0104a714eabecfc78c44ba9ac1c31ede47c57b.tar forums-3e0104a714eabecfc78c44ba9ac1c31ede47c57b.tar.gz forums-3e0104a714eabecfc78c44ba9ac1c31ede47c57b.tar.bz2 forums-3e0104a714eabecfc78c44ba9ac1c31ede47c57b.tar.xz forums-3e0104a714eabecfc78c44ba9ac1c31ede47c57b.zip |
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
Diffstat (limited to 'phpBB/includes/bbcode.php')
-rw-r--r-- | phpBB/includes/bbcode.php | 7 |
1 files 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); |