mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-30 05:20:56 +02:00
[ticket/13377] Fix decoding for www type URLs in function decode_message()
PHPBB3-13377
This commit is contained in:
@@ -2749,7 +2749,7 @@ function get_preg_expression($mode)
|
|||||||
return array(
|
return array(
|
||||||
'#<!\-\- e \-\-><a href="mailto:(.*?)">.*?</a><!\-\- e \-\->#',
|
'#<!\-\- e \-\-><a href="mailto:(.*?)">.*?</a><!\-\- e \-\->#',
|
||||||
'#<!\-\- l \-\-><a (?:class="[\w-]+" )?href="(.*?)(?:(&|\?)sid=[0-9a-f]{32})?">.*?</a><!\-\- l \-\->#',
|
'#<!\-\- l \-\-><a (?:class="[\w-]+" )?href="(.*?)(?:(&|\?)sid=[0-9a-f]{32})?">.*?</a><!\-\- l \-\->#',
|
||||||
'#<!\-\- ([mw]) \-\-><a (?:class="[\w-]+" )?href="(.*?)">.*?</a><!\-\- \1 \-\->#',
|
'#<!\-\- ([mw]) \-\-><a (?:class="[\w-]+" )?href="(.*?)">(.*?)</a><!\-\- \1 \-\->#',
|
||||||
'#<!\-\- s(.*?) \-\-><img src="\{SMILIES_PATH\}\/.*? \/><!\-\- s\1 \-\->#',
|
'#<!\-\- s(.*?) \-\-><img src="\{SMILIES_PATH\}\/.*? \/><!\-\- s\1 \-\->#',
|
||||||
'#<!\-\- .*? \-\->#s',
|
'#<!\-\- .*? \-\->#s',
|
||||||
'#<.*?>#s',
|
'#<.*?>#s',
|
||||||
|
@@ -420,7 +420,7 @@ function decode_message(&$message, $bbcode_uid = '')
|
|||||||
$message = str_replace($match, $replace, $message);
|
$message = str_replace($match, $replace, $message);
|
||||||
|
|
||||||
$match = get_preg_expression('bbcode_htm');
|
$match = get_preg_expression('bbcode_htm');
|
||||||
$replace = array('\1', '\1', '\2', '\1', '', '');
|
$replace = array('\1', '\1', '\3', '\1', '', '');
|
||||||
|
|
||||||
$message = preg_replace($match, $replace, $message);
|
$message = preg_replace($match, $replace, $message);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user