aboutsummaryrefslogtreecommitdiffstats
path: root/include/markdown.php
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2018-05-09 17:03:10 -0700
committerzotlabs <mike@macgirvin.com>2018-05-09 17:03:10 -0700
commit9acf007687d58a0e4fe1f1b348e668c3329655f7 (patch)
tree8d54faf2f77af430f70476a63e44e1ff2479b8a5 /include/markdown.php
parent2bd7d30a5b3b1b12c2caeb6ecbc8fe9af23f3e1c (diff)
downloadvolse-hubzilla-9acf007687d58a0e4fe1f1b348e668c3329655f7.tar.gz
volse-hubzilla-9acf007687d58a0e4fe1f1b348e668c3329655f7.tar.bz2
volse-hubzilla-9acf007687d58a0e4fe1f1b348e668c3329655f7.zip
hubzilla issue #1166
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 431ba84a4..de9862801 100644
--- a/include/markdown.php
+++ b/include/markdown.php
@@ -75,10 +75,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(['[img', '/img]'], ['[zmg', '/zmg]'], $s);
- $s = preg_replace("/([^\]\=]|^)(https?\:\/\/)([a-zA-Z0-9\pL\:\/\-\?\&\;\.\=\_\~\#\%\$\!\+\,\@\(\)]+)/ismu", '$1[zrl=$2$3]$2$3[/zrl]',$s);
+ $s = preg_replace("/([^\]\=\{]|^)(https?\:\/\/)([a-zA-Z0-9\pL\:\/\-\?\&\;\.\=\_\~\#\%\$\!\+\,\@\(\)]+)/ismu", '$1[zrl=$2$3]$2$3[/zrl]',$s);
}
else {
- $s = preg_replace("/([^\]\=]|^)(https?\:\/\/)([a-zA-Z0-9\pL\:\/\-\?\&\;\.\=\_\~\#\%\$\!\+\,\@\(\)]+)/ismu", '$1[url=$2$3]$2$3[/url]',$s);
+ $s = preg_replace("/([^\]\=\{]|^)(https?\:\/\/)([a-zA-Z0-9\pL\:\/\-\?\&\;\.\=\_\~\#\%\$\!\+\,\@\(\)]+)/ismu", '$1[url=$2$3]$2$3[/url]',$s);
}
// remove duplicate adjacent code tags