diff options
author | friendica <info@friendica.com> | 2015-03-06 20:45:26 -0800 |
---|---|---|
committer | friendica <info@friendica.com> | 2015-03-06 20:45:26 -0800 |
commit | 53e908d7b7ea1b1ff9aa5ca6154dc4c9e7ca0d13 (patch) | |
tree | 0b64a69bf3e89b4b2e117d5ed2d729e9d460ce82 /mod/item.php | |
parent | fc6e7db7dc1a8a74b0df6e56515770a36cce572e (diff) | |
download | volse-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 'mod/item.php')
-rw-r--r-- | mod/item.php | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mod/item.php b/mod/item.php index dbee2df3b..8b45f5db9 100644 --- a/mod/item.php +++ b/mod/item.php @@ -523,7 +523,7 @@ function item_post(&$a) { $body = preg_replace_callback('/\[url(.*?)\[\/(url)\]/ism','red_escape_codeblock',$body); $body = preg_replace_callback('/\[zrl(.*?)\[\/(zrl)\]/ism','red_escape_codeblock',$body); - $body = preg_replace_callback("/([^\]\='".'"'."]|^|\#\^)(https?\:\/\/[a-zA-Z0-9\:\/\-\?\&\;\.\=\@\_\~\#\%\$\!\+\,]+)/ism", 'red_zrl_callback', $body); + $body = preg_replace_callback("/([^\]\='".'"'."\/]|^|\#\^)(https?\:\/\/[a-zA-Z0-9\:\/\-\?\&\;\.\=\@\_\~\#\%\$\!\+\,]+)/ism", 'red_zrl_callback', $body); $body = preg_replace_callback('/\[\$b64zrl(.*?)\[\/(zrl)\]/ism','red_unescape_codeblock',$body); $body = preg_replace_callback('/\[\$b64url(.*?)\[\/(url)\]/ism','red_unescape_codeblock',$body); |