|
From: Jonathan H. <the...@us...> - 2002-01-08 19:00:32
|
Update of /cvsroot/phpbb/phpBB2/includes
In directory usw-pr-cvs1:/tmp/cvs-serv28795
Modified Files:
bbcode.php
Log Message:
trimmed down the quote bug fix in second pass to one preg_replace rather than two, by changing the pattern up a bit...
Index: bbcode.php
===================================================================
RCS file: /cvsroot/phpbb/phpBB2/includes/bbcode.php,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -r1.20 -r1.21
*** bbcode.php 2002/01/08 15:51:43 1.20
--- bbcode.php 2002/01/08 19:00:28 1.21
***************
*** 168,175 ****
$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);
// [b] and [/b] for bolding text.
--- 168,174 ----
$text = str_replace("[/quote:$uid]", $bbcode_tpl['quote_close'], $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.
|