Support for magnet links in description.

This commit is contained in:
Sébastien SAUVAGE 2013-02-27 15:49:32 +01:00
parent 64bf914aea
commit 30b0672d04
1 changed files with 1 additions and 1 deletions

View File

@ -223,7 +223,7 @@ function smallHash($text)
function text2clickable($url)
{
$redir = empty($GLOBALS['redirector']) ? '' : $GLOBALS['redirector'];
return preg_replace('!(((?:https?|ftp|file)://|apt:)\S+[[:alnum:]]/?)!si','<a href="'.$redir.'$1" rel="nofollow">$1</a>',$url);
return preg_replace('!(((?:https?|ftp|file)://|apt:|magnet:)\S+[[:alnum:]]/?)!si','<a href="'.$redir.'$1" rel="nofollow">$1</a>',$url);
}
// This function inserts &nbsp; where relevant so that multiple spaces are properly displayed in HTML