參考連結:http://www.phpbb-tw.net/phpbb/viewtopic.php?t=28049
使用版本:phpBB 2.0.19
網站位置:http://forums.jcms.com.tw
狀況描述:
我在升級完2.0.19了之後發現引言代碼會變成"WesleyWei";p="22668 寫到:"
可是phpBB 2.0.18卻沒有這個問題,請問這是不是跟下面這段phpbb_2.0.18_to_2.0.19有關?
代碼: 選擇全部
#
#-----[ FIND ]---------------------------------------------
# Line 255
$text = bbencode_first_pass_pda($text, $uid, '/\[quote=(\\\\\".*?\\\\\")\]/is', '[/quote]', '', false, '', "[quote:$uid=\\\1]");
#
#-----[ REPLACE WITH ]---------------------------------------------
#
$text = bbencode_first_pass_pda($text, $uid, '/\[quote=\\\\\\\"(.*?)\\\\\\\"\]/is', '[/quote]', '', false, '', "[quote:$uid=\\\\\"\\\1\\\\\"]");
#
#-----[ FIND ]---------------------------------------------
# Line 392
if( preg_match('#\[quote=\\\\\"#si', $possible_start, $match) && !preg_match('#\[quote=\\\\\"(.*?)\\\\\"\]#si', $possible_start) )
{
// OK we are in a quote tag that probably contains a ] bracket.
// Grab a bit more of the string to hopefully get all of it..
if ($close_pos = strpos($text, '"]', $curr_pos + 9))
{
if (strpos(substr($text, $curr_pos + 9, $close_pos - ($curr_pos + 9)), '[quote') === false)
{
$possible_start = substr($text, $curr_pos, $close_pos - $curr_pos + 2);
#
#-----[ REPLACE WITH ]---------------------------------------------
#
if( preg_match('#\[quote=\\\\\"#si', $possible_start, $match) && !preg_match('#\[quote=\\\\\"(.*?)\\\\\"\]#si', $possible_start) )
{
// OK we are in a quote tag that probably contains a ] bracket.
// Grab a bit more of the string to hopefully get all of it..
if ($close_pos = strpos($text, '"]', $curr_pos + 14))
{
if (strpos(substr($text, $curr_pos + 14, $close_pos - ($curr_pos + 14)), '[quote') === false)
{
$possible_start = substr($text, $curr_pos, $close_pos - $curr_pos + 7);代碼: 選擇全部
#
#-----[ FIND ]---------------------------------------------
# around line 269
$text = bbencode_first_pass_pda($text, $uid, '/\[quote=(\\\\\\\"[^"]*?\\\\\\\")\]/is', '[/quote]', '', false, '', "[quote:$uid=\\\1]");
#
#-----[ AFTER, ADD ]---------------------------------------
#
// [QUOTE] and [/QUOTE] for posting replies with quote, or just for quoting stuff with an pre-defined post entry
$text = bbencode_first_pass_pda($text, $uid, '/\[quote=p=(\\\\\\\"[0-9]+\\\\\\\")\]/is', '[/quote]', '', false, '', "[quote:$uid=p=\\\1]");
$text = bbencode_first_pass_pda($text, $uid, '/\[quote=(\\\\\".*?\\\\\");p=(\\\\\\\"[0-9]+\\\\\\\")\]/is', '[/quote]', '', false, '', "[quote:$uid=\\\1;p=\\\2]");
