username quoting should be working again...

git-svn-id: file:///svn/phpbb/trunk@4485 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
Meik Sievertsen 2003-09-07 18:11:37 +00:00
parent dd86187535
commit 9dc398f302
3 changed files with 6 additions and 6 deletions

View file

@ -161,7 +161,7 @@ class bbcode
'[/quote:$uid]' => $this->bbcode_tpl('quote_close', $bbcode_id) '[/quote:$uid]' => $this->bbcode_tpl('quote_close', $bbcode_id)
), ),
'preg' => array( 'preg' => array(
'#\[quote="(.*?)":$uid\]#' => $this->bbcode_tpl('quote_username_open', $bbcode_id) '#\[quote="(.*?)":$uid\]#' => $this->bbcode_tpl('quote_username_open', $bbcode_id)
) )
); );
break; break;

View file

@ -163,7 +163,7 @@ class parse_message
// keep [code] in first position and [quote] in second position. // keep [code] in first position and [quote] in second position.
$this->bbcodes = array( $this->bbcodes = array(
'code' => array('bbcode_id' => 8, 'regexp' => array('#\[code(?:=([a-z]+))?\](.+\[/code\])#ise' => "\$this->bbcode_code('\$1', '\$2')")), 'code' => array('bbcode_id' => 8, 'regexp' => array('#\[code(?:=([a-z]+))?\](.+\[/code\])#ise' => "\$this->bbcode_code('\$1', '\$2')")),
'quote' => array('bbcode_id' => 0, 'regexp' => array('#\[quote(?:="(.*?)")?\](.+)\[/quote\]#ise' => "\$this->bbcode_quote('\$0')")), 'quote' => array('bbcode_id' => 0, 'regexp' => array('#\[quote(?:="(.*?)")?\](.+)\[/quote\]#ise' => "\$this->bbcode_quote('\$0')")),
'b' => array('bbcode_id' => 1, 'regexp' => array('#\[b\](.*?)\[/b\]#is' => '[b:' . $this->bbcode_uid . ']$1[/b:' . $this->bbcode_uid . ']')), 'b' => array('bbcode_id' => 1, 'regexp' => array('#\[b\](.*?)\[/b\]#is' => '[b:' . $this->bbcode_uid . ']$1[/b:' . $this->bbcode_uid . ']')),
'i' => array('bbcode_id' => 2, 'regexp' => array('#\[i\](.*?)\[/i\]#is' => '[i:' . $this->bbcode_uid . ']$1[/i:' . $this->bbcode_uid . ']')), 'i' => array('bbcode_id' => 2, 'regexp' => array('#\[i\](.*?)\[/i\]#is' => '[i:' . $this->bbcode_uid . ']$1[/i:' . $this->bbcode_uid . ']')),
'url' => array('bbcode_id' => 3, 'regexp' => array('#\[url=?(.*?)?\](.*?)\[/url\]#ise' => "\$this->validate_url('\$1', '\$2')")), 'url' => array('bbcode_id' => 3, 'regexp' => array('#\[url=?(.*?)?\](.*?)\[/url\]#ise' => "\$this->validate_url('\$1', '\$2')")),
@ -454,7 +454,7 @@ class parse_message
$tok = '['; $tok = '[';
$buffer = ''; $buffer = '';
} }
elseif (preg_match('#^quote(?:="(.*?)")?$#is', $buffer, $m)) elseif (preg_match('#^quote(?:="(.*?)")?$#is', $buffer, $m))
{ {
// the buffer holds a valid opening tag // the buffer holds a valid opening tag
if ($config['max_quote_depth'] && count($close_tags) >= $config['max_quote_depth']) if ($config['max_quote_depth'] && count($close_tags) >= $config['max_quote_depth'])
@ -502,7 +502,7 @@ class parse_message
$username = str_replace('[', '[', str_replace(']', ']', $m[1])); $username = str_replace('[', '[', str_replace(']', ']', $m[1]));
} }
$out .= 'quote="' . $username . '":' . $this->bbcode_uid . ']'; $out .= 'quote="' . $username . '":' . $this->bbcode_uid . ']';
} }
else else
{ {
@ -512,7 +512,7 @@ class parse_message
$tok = '['; $tok = '[';
$buffer = ''; $buffer = '';
} }
elseif (preg_match('#^quote="(.*?)#is', $buffer, $m)) elseif (preg_match('#^quote="(.*?)#is', $buffer, $m))
{ {
// the buffer holds an invalid opening tag // the buffer holds an invalid opening tag
$buffer .= ']'; $buffer .= ']';