mirror of
https://github.com/phpbb/phpbb.git
synced 2025-04-21 08:12:17 +02:00
[ticket/14527] Decode automatically generated postlink without prefix
The http prefix gets automatically added and should be removed prior to outputting the post to the user. PHPBB3-14527
This commit is contained in:
parent
dad531e4b2
commit
17b8e93a53
@ -2745,6 +2745,7 @@ function get_preg_expression($mode)
|
||||
return array(
|
||||
'#<!\-\- e \-\-><a href="mailto:(.*?)">.*?</a><!\-\- e \-\->#',
|
||||
'#<!\-\- l \-\-><a (?:class="[\w-]+" )?href="(.*?)(?:(&|\?)sid=[0-9a-f]{32})?">.*?</a><!\-\- l \-\->#',
|
||||
'#<!\-\- ([mw]) \-\-><a (?:class="[\w-]+" )?href="http://(.*?)">\2</a><!\-\- \1 \-\->#',
|
||||
'#<!\-\- ([mw]) \-\-><a (?:class="[\w-]+" )?href="(.*?)">.*?</a><!\-\- \1 \-\->#',
|
||||
'#<!\-\- s(.*?) \-\-><img src="\{SMILIES_PATH\}\/.*? \/><!\-\- s\1 \-\->#',
|
||||
'#<!\-\- .*? \-\->#s',
|
||||
|
@ -469,7 +469,7 @@ function decode_message(&$message, $bbcode_uid = '')
|
||||
$message = str_replace($match, $replace, $message);
|
||||
|
||||
$match = get_preg_expression('bbcode_htm');
|
||||
$replace = array('\1', '\1', '\2', '\1', '', '');
|
||||
$replace = array('\1', '\1', '\2', '\2', '\1', '', '');
|
||||
|
||||
$message = preg_replace($match, $replace, $message);
|
||||
}
|
||||
|
@ -49,7 +49,7 @@ class phpbb_text_processing_decode_message_test extends phpbb_test_case
|
||||
),
|
||||
array(
|
||||
'<!-- w --><a class="postlink" href="http://www.phpbb.com">www.phpbb.com</a><!-- w -->',
|
||||
'http://www.phpbb.com'
|
||||
'www.phpbb.com'
|
||||
),
|
||||
array(
|
||||
'<!-- m --><a class="postlink" href="http://www.phpbb.com">http://www.phpbb.com</a><!-- m -->',
|
||||
|
Loading…
x
Reference in New Issue
Block a user