aboutsummaryrefslogtreecommitdiffhomepage
path: root/application/LinkUtils.php
diff options
context:
space:
mode:
authorArthurHoaro <arthur@hoa.ro>2017-09-30 14:25:53 +0200
committerGitHub <noreply@github.com>2017-09-30 14:25:53 +0200
commit3512f4461722c9a3c7cf6511232bda156bf91970 (patch)
tree81db6c1d6f8b970322b5b2bd265bc04ad567fef3 /application/LinkUtils.php
parent7c670b39a2505f625066e7d87e1536fc02e9d6fc (diff)
parent601faf97516a836e4ae57dc4cecb9225c0a04338 (diff)
downloadShaarli-3512f4461722c9a3c7cf6511232bda156bf91970.tar.gz
Shaarli-3512f4461722c9a3c7cf6511232bda156bf91970.tar.zst
Shaarli-3512f4461722c9a3c7cf6511232bda156bf91970.zip
Merge pull request #976 from ArthurHoaro/hotfix/url-parentheses
Fix parsing for description links with parentheses
Diffstat (limited to 'application/LinkUtils.php')
-rw-r--r--application/LinkUtils.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/application/LinkUtils.php b/application/LinkUtils.php
index 976474de..267e62cd 100644
--- a/application/LinkUtils.php
+++ b/application/LinkUtils.php
@@ -109,7 +109,7 @@ function count_private($links)
109 */ 109 */
110function text2clickable($text, $redirector = '') 110function text2clickable($text, $redirector = '')
111{ 111{
112 $regex = '!(((?:https?|ftp|file)://|apt:|magnet:)\S+[[:alnum:]]/?)!si'; 112 $regex = '!(((?:https?|ftp|file)://|apt:|magnet:)\S+[a-z0-9\(\)]/?)!si';
113 113
114 if (empty($redirector)) { 114 if (empty($redirector)) {
115 return preg_replace($regex, '<a href="$1">$1</a>', $text); 115 return preg_replace($regex, '<a href="$1">$1</a>', $text);