aboutsummaryrefslogtreecommitdiffstats
path: root/include/markdown.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2017-05-08 19:10:08 -0700
committerzotlabs <mike@macgirvin.com>2017-05-08 19:10:08 -0700
commite059efb4c47dec32524ee2ff61d5cd9e7ad0cb84 (patch)
tree724c684b862a11e580a82a2fee3046a8625f913e /include/markdown.php
parent2e531c103f33e798d979bd9dcda168cc6cb5d3e0 (diff)
downloadvolse-hubzilla-e059efb4c47dec32524ee2ff61d5cd9e7ad0cb84.tar.gz
volse-hubzilla-e059efb4c47dec32524ee2ff61d5cd9e7ad0cb84.tar.bz2
volse-hubzilla-e059efb4c47dec32524ee2ff61d5cd9e7ad0cb84.zip
handle mastodon urls in markdown/bbcode conversion
Diffstat (limited to 'include/markdown.php')
-rw-r--r--include/markdown.php4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/markdown.php b/include/markdown.php
index 90266afc9..5826cb089 100644
--- a/include/markdown.php
+++ b/include/markdown.php
@@ -133,10 +133,10 @@ function markdown_to_bb($s, $use_zrl = false, $options = []) {
// 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