aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorfriendica <info@friendica.com>2015-03-06 20:45:26 -0800
committerfriendica <info@friendica.com>2015-03-06 20:45:26 -0800
commit53e908d7b7ea1b1ff9aa5ca6154dc4c9e7ca0d13 (patch)
tree0b64a69bf3e89b4b2e117d5ed2d729e9d460ce82 /include
parentfc6e7db7dc1a8a74b0df6e56515770a36cce572e (diff)
downloadvolse-hubzilla-53e908d7b7ea1b1ff9aa5ca6154dc4c9e7ca0d13.tar.gz
volse-hubzilla-53e908d7b7ea1b1ff9aa5ca6154dc4c9e7ca0d13.tar.bz2
volse-hubzilla-53e908d7b7ea1b1ff9aa5ca6154dc4c9e7ca0d13.zip
when fixing "naked links" make sure not to double link double urls as seen in archive.org - which has the complete unescaped target url, scheme and all, as part of its own.
Diffstat (limited to 'include')
-rw-r--r--include/bbcode.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/bbcode.php b/include/bbcode.php
index 9a607c80d..6b8cb941f 100644
--- a/include/bbcode.php
+++ b/include/bbcode.php
@@ -472,7 +472,7 @@ function bbcode($Text,$preserve_nl = false, $tryoembed = true) {
$urlchars = '[a-zA-Z0-9\:\/\-\?\&\;\.\=\@\_\~\#\%\$\!\+\,]';
if (strpos($Text,'http') !== false) {
- $Text = preg_replace("/([^\]\='".'"'."]|^)(https?\:\/\/$urlchars+)/ism", '$1<a href="$2" >$2</a>', $Text);
+ $Text = preg_replace("/([^\]\='".'"'."\/]|^|\#\^)(https?\:\/\/$urlchars+)/ism", '$1<a href="$2" >$2</a>', $Text);
}
if (strpos($Text,'[/qr]') !== false) {