diff options
author | zotlabs <mike@macgirvin.com> | 2017-05-08 19:10:08 -0700 |
---|---|---|
committer | Mario Vavti <mario@mariovavti.com> | 2017-05-10 14:48:04 +0200 |
commit | fa94c0a65b7e35c74429ff9fb507289714c6de76 (patch) | |
tree | 02fa42c9eabfafbac748c851a6767660ee325d46 /include/markdown.php | |
parent | 6c0e0b3eaeead84686148f0fa43cd441357a8b8c (diff) | |
download | volse-hubzilla-fa94c0a65b7e35c74429ff9fb507289714c6de76.tar.gz volse-hubzilla-fa94c0a65b7e35c74429ff9fb507289714c6de76.tar.bz2 volse-hubzilla-fa94c0a65b7e35c74429ff9fb507289714c6de76.zip |
handle mastodon urls in markdown/bbcode conversion
Diffstat (limited to 'include/markdown.php')
-rw-r--r-- | include/markdown.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/markdown.php b/include/markdown.php index 7e1f1c42c..a9617f72b 100644 --- a/include/markdown.php +++ b/include/markdown.php @@ -199,10 +199,10 @@ function markdown_to_bb($s, $use_zrl = false) { // Convert everything that looks like a link to a link if($use_zrl) { $s = str_replace(array('[img','/img]'),array('[zmg','/zmg]'),$s); - $s = preg_replace("/([^\]\=]|^)(https?\:\/\/)([a-zA-Z0-9\:\/\-\?\&\;\.\=\_\~\#\%\$\!\+\,\(\)]+)/ism", '$1[zrl=$2$3]$2$3[/zrl]',$s); + $s = preg_replace("/([^\]\=]|^)(https?\:\/\/)([a-zA-Z0-9\:\/\-\?\&\;\.\=\_\~\#\%\$\!\+\,\@\(\)]+)/ism", '$1[zrl=$2$3]$2$3[/zrl]',$s); } else { - $s = preg_replace("/([^\]\=]|^)(https?\:\/\/)([a-zA-Z0-9\:\/\-\?\&\;\.\=\_\~\#\%\$\!\+\,\(\)]+)/ism", '$1[url=$2$3]$2$3[/url]',$s); + $s = preg_replace("/([^\]\=]|^)(https?\:\/\/)([a-zA-Z0-9\:\/\-\?\&\;\.\=\_\~\#\%\$\!\+\,\@\(\)]+)/ism", '$1[url=$2$3]$2$3[/url]',$s); } // remove duplicate adjacent code tags |