aboutsummaryrefslogtreecommitdiffstats
path: root/include/bb2diaspora.php
diff options
context:
space:
mode:
authorAndrew Manning <tamanning@zoho.com>2016-12-05 20:16:19 -0500
committerAndrew Manning <tamanning@zoho.com>2016-12-05 20:16:19 -0500
commit8ba5cbc2b99ffed424d085b6365cbc07309ad573 (patch)
tree865cdc545673e1f5781a2ec42dbb6015ac251cf2 /include/bb2diaspora.php
parent3b3da24823defd89f4ed256b7c45df8b71cb0627 (diff)
parentfbf13dde213dcecfdc6c6e5d95b165bb46eda85a (diff)
downloadvolse-hubzilla-8ba5cbc2b99ffed424d085b6365cbc07309ad573.tar.gz
volse-hubzilla-8ba5cbc2b99ffed424d085b6365cbc07309ad573.tar.bz2
volse-hubzilla-8ba5cbc2b99ffed424d085b6365cbc07309ad573.zip
Merge remote-tracking branch 'upstream/dev' into doco
Diffstat (limited to 'include/bb2diaspora.php')
-rw-r--r--include/bb2diaspora.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/bb2diaspora.php b/include/bb2diaspora.php
index e6c97a750..e22b6a7dd 100644
--- a/include/bb2diaspora.php
+++ b/include/bb2diaspora.php
@@ -149,16 +149,18 @@ function markdown_to_bb($s, $use_zrl = false) {
$s = html2bbcode($s);
+ $s = preg_replace("/\[([uz])rl=(.*?)\]\[\/[uz]rl\]/ism",'[$1rl=$2]$2[/$1rl]',$s);
+
// protect the recycle symbol from turning into a tag, but without unescaping angles and naked ampersands
$s = str_replace('&#x2672;',html_entity_decode('&#x2672;',ENT_QUOTES,'UTF-8'),$s);
// 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