aboutsummaryrefslogtreecommitdiffhomepage
path: root/index.php
diff options
context:
space:
mode:
authorSébastien SAUVAGE <sebsauvage@sebsauvage.net>2013-02-27 15:49:32 +0100
committerSébastien SAUVAGE <sebsauvage@sebsauvage.net>2013-02-27 15:49:32 +0100
commit30b0672d0437578d8eaec8b9cc74c2f1700cf484 (patch)
treebebd441b16813ba667236aa4f5bc23c81bf57bf9 /index.php
parent64bf914aea0c692784df53f844173bc9356d2899 (diff)
downloadShaarli-30b0672d0437578d8eaec8b9cc74c2f1700cf484.tar.gz
Shaarli-30b0672d0437578d8eaec8b9cc74c2f1700cf484.tar.zst
Shaarli-30b0672d0437578d8eaec8b9cc74c2f1700cf484.zip
Support for magnet links in description.
Diffstat (limited to 'index.php')
-rw-r--r--index.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/index.php b/index.php
index 3349ff7a..448c23a6 100644
--- a/index.php
+++ b/index.php
@@ -223,7 +223,7 @@ function smallHash($text)
223function text2clickable($url) 223function 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 &nbsp; where relevant so that multiple spaces are properly displayed in HTML 229// This function inserts &nbsp; where relevant so that multiple spaces are properly displayed in HTML