diff options
author | Sébastien SAUVAGE <sebsauvage@sebsauvage.net> | 2013-02-27 15:49:32 +0100 |
---|---|---|
committer | Sébastien SAUVAGE <sebsauvage@sebsauvage.net> | 2013-02-27 15:49:32 +0100 |
commit | 30b0672d0437578d8eaec8b9cc74c2f1700cf484 (patch) | |
tree | bebd441b16813ba667236aa4f5bc23c81bf57bf9 | |
parent | 64bf914aea0c692784df53f844173bc9356d2899 (diff) | |
download | Shaarli-30b0672d0437578d8eaec8b9cc74c2f1700cf484.tar.gz Shaarli-30b0672d0437578d8eaec8b9cc74c2f1700cf484.tar.zst Shaarli-30b0672d0437578d8eaec8b9cc74c2f1700cf484.zip |
Support for magnet links in description.
-rw-r--r-- | index.php | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -223,7 +223,7 @@ function smallHash($text) | |||
223 | function text2clickable($url) | 223 | function text2clickable($url) |
224 | { | 224 | { |
225 | $redir = empty($GLOBALS['redirector']) ? '' : $GLOBALS['redirector']; | 225 | $redir = empty($GLOBALS['redirector']) ? '' : $GLOBALS['redirector']; |
226 | return preg_replace('!(((?:https?|ftp|file)://|apt:)\S+[[:alnum:]]/?)!si','<a href="'.$redir.'$1" rel="nofollow">$1</a>',$url); | 226 | return preg_replace('!(((?:https?|ftp|file)://|apt:|magnet:)\S+[[:alnum:]]/?)!si','<a href="'.$redir.'$1" rel="nofollow">$1</a>',$url); |
227 | } | 227 | } |
228 | 228 | ||
229 | // This function inserts where relevant so that multiple spaces are properly displayed in HTML | 229 | // This function inserts where relevant so that multiple spaces are properly displayed in HTML |