mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-30 21:40:43 +02:00
[ticket/8319] Do not repeat the replacement
PHPBB3-8319
This commit is contained in:
@@ -431,15 +431,11 @@ class acp_bbcodes
|
||||
$fp_replace = str_replace($token, $replace, $fp_replace);
|
||||
|
||||
$sp_match = str_replace(preg_quote($token, '!'), $sp_tokens[$token_type], $sp_match);
|
||||
if ($token_type === 'LOCAL_URL')
|
||||
{
|
||||
// Prepend the board url to local relative links
|
||||
$sp_replace = str_replace($token, generate_board_url() . '/' . '${' . ($n + 1) . '}', $sp_replace);
|
||||
}
|
||||
else
|
||||
{
|
||||
$sp_replace = str_replace($token, '${' . ($n + 1) . '}', $sp_replace);
|
||||
}
|
||||
|
||||
// Prepend the board url to local relative links
|
||||
$replace_prepend = ($token_type === 'LOCAL_URL') ? generate_board_url() . '/' : '';
|
||||
|
||||
$sp_replace = str_replace($token, $replace_prepend . '${' . ($n + 1) . '}', $sp_replace);
|
||||
}
|
||||
|
||||
$fp_match = '!' . $fp_match . '!' . $modifiers;
|
||||
|
Reference in New Issue
Block a user