diff options
author | ArthurHoaro <arthur@hoa.ro> | 2017-09-29 18:52:38 +0200 |
---|---|---|
committer | ArthurHoaro <arthur@hoa.ro> | 2017-09-29 18:52:38 +0200 |
commit | 601faf97516a836e4ae57dc4cecb9225c0a04338 (patch) | |
tree | c4ec24abaec4f1ff5fc272146cd9a908f7571fef /application | |
parent | 0cba184cf80423d990aba09a2a0a1f2b9c5882b7 (diff) | |
download | Shaarli-601faf97516a836e4ae57dc4cecb9225c0a04338.tar.gz Shaarli-601faf97516a836e4ae57dc4cecb9225c0a04338.tar.zst Shaarli-601faf97516a836e4ae57dc4cecb9225c0a04338.zip |
Fix parsing for description links with parentheses
With markdown plugin disabled
relates to #966
Diffstat (limited to 'application')
-rw-r--r-- | application/LinkUtils.php | 2 |
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 | */ |
110 | function text2clickable($text, $redirector = '') | 110 | function 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); |