mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 14:00:31 +02:00
- letting urls work again, fixing [code] breakage on urls, corrected magic_url to be able to parse urls at the beginning/end of bbcode blocks
- fixed "edited by" message. git-svn-id: file:///svn/phpbb/trunk@5027 89ea8834-ac86-4346-8a33-228a782c2dd0
This commit is contained in:
@@ -163,11 +163,10 @@ class bbcode
|
||||
case 0:
|
||||
$this->bbcode_cache[$bbcode_id] = array(
|
||||
'str' => array(
|
||||
'[quote:$uid]' => $this->bbcode_tpl('quote_open', $bbcode_id),
|
||||
'[/quote:$uid]' => $this->bbcode_tpl('quote_close', $bbcode_id)
|
||||
),
|
||||
'preg' => array(
|
||||
'#\[quote="(.*?)":$uid\]#' => $this->bbcode_tpl('quote_username_open', $bbcode_id)
|
||||
'#\[quote(?:="(.*?)")?:$uid\](.)#ise' => "\$this->bbcode_second_pass_quote('\$1', '\$2')"
|
||||
)
|
||||
);
|
||||
break;
|
||||
@@ -459,6 +458,23 @@ class bbcode
|
||||
return str_replace('{LIST_TYPE}', $type, $this->bbcode_tpl($tpl));
|
||||
}
|
||||
|
||||
function bbcode_second_pass_quote($username, $quote)
|
||||
{
|
||||
// when using the /e modifier, preg_replace slashes double-quotes but does not
|
||||
// seem to slash anything else
|
||||
$quote = str_replace('\"', '"', $quote);
|
||||
|
||||
// remove newline at the beginning
|
||||
if ($quote{0} == "\n")
|
||||
{
|
||||
$quote = substr($quote, 1);
|
||||
}
|
||||
|
||||
$quote = (($username) ? str_replace('$1', $username, $this->bbcode_tpl('quote_username_open')) : $this->bbcode_tpl('quote_open')) . $quote;
|
||||
|
||||
return $quote;
|
||||
}
|
||||
|
||||
function bbcode_second_pass_code($type, $code)
|
||||
{
|
||||
// when using the /e modifier, preg_replace slashes double-quotes but does not
|
||||
|
Reference in New Issue
Block a user