diff options
| author | Tristan Darricau <tristan.darricau@sensiolabs.com> | 2016-03-25 11:35:47 +0100 |
|---|---|---|
| committer | Tristan Darricau <tristan.darricau@sensiolabs.com> | 2016-03-25 11:35:47 +0100 |
| commit | 8d989810121e3baf315ceaf8d9cd225317a625d9 (patch) | |
| tree | 9088f5d32cf8b569957b0846a7a6b6006f35e827 /phpBB/includes | |
| parent | f29ebb1846caadc9622cad69098e5638f6c9f155 (diff) | |
| parent | 17b8e93a5350e297f9be0925120f0b6cf34f5ffe (diff) | |
| download | forums-8d989810121e3baf315ceaf8d9cd225317a625d9.tar forums-8d989810121e3baf315ceaf8d9cd225317a625d9.tar.gz forums-8d989810121e3baf315ceaf8d9cd225317a625d9.tar.bz2 forums-8d989810121e3baf315ceaf8d9cd225317a625d9.tar.xz forums-8d989810121e3baf315ceaf8d9cd225317a625d9.zip | |
Merge pull request #4218 from marc1706/ticket/14527
[ticket/14527] Retrieve link URL from href and not link text
* marc1706/ticket/14527:
[ticket/14527] Decode automatically generated postlink without prefix
[ticket/14527] Add tests for reverted improper fix
[ticket/14527] Retrieve link URL from href and not link text
Diffstat (limited to 'phpBB/includes')
| -rw-r--r-- | phpBB/includes/functions.php | 3 | ||||
| -rw-r--r-- | phpBB/includes/functions_content.php | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index c4f285c905..10788d0d6a 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -2746,7 +2746,8 @@ 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="(.*?)">(.*?)</a><!\-\- \1 \-\->#', + '#<!\-\- ([mw]) \-\-><a (?:class="[\w-]+" )?href="http://(.*?)">\2</a><!\-\- \1 \-\->#', + '#<!\-\- ([mw]) \-\-><a (?:class="[\w-]+" )?href="(.*?)">.*?</a><!\-\- \1 \-\->#', '#<!\-\- s(.*?) \-\-><img src="\{SMILIES_PATH\}\/.*? \/><!\-\- s\1 \-\->#', '#<!\-\- .*? \-\->#s', '#<.*?>#s', diff --git a/phpBB/includes/functions_content.php b/phpBB/includes/functions_content.php index 39a3f0352f..df4a51db98 100644 --- a/phpBB/includes/functions_content.php +++ b/phpBB/includes/functions_content.php @@ -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', '\3', '\1', '', ''); + $replace = array('\1', '\1', '\2', '\2', '\1', '', ''); $message = preg_replace($match, $replace, $message); } |
