]> git.immae.eu Git - github/shaarli/Shaarli.git/blobdiff - application/LinkUtils.php
Fix parsing for description links with parentheses
[github/shaarli/Shaarli.git] / application / LinkUtils.php
index 976474de721ad14636b9b431f0cec06a8920e120..267e62cde41f9193e384cede8665311fe76ccd6e 100644 (file)
@@ -109,7 +109,7 @@ function count_private($links)
  */
 function text2clickable($text, $redirector = '')
 {
-    $regex = '!(((?:https?|ftp|file)://|apt:|magnet:)\S+[[:alnum:]]/?)!si';
+    $regex = '!(((?:https?|ftp|file)://|apt:|magnet:)\S+[a-z0-9\(\)]/?)!si';
 
     if (empty($redirector)) {
         return preg_replace($regex, '<a href="$1">$1</a>', $text);