aboutsummaryrefslogtreecommitdiffstats
path: root/include/bb2diaspora.php
diff options
context:
space:
mode:
authorroot <root@debian.(none)>2012-06-01 03:10:57 -0400
committerroot <root@debian.(none)>2012-06-01 03:10:57 -0400
commitbad66a1154b3ef6ba639038218317f7ac5bf43d7 (patch)
treea03244a0005d732412fcfe6a1c8eb5734fcf6b78 /include/bb2diaspora.php
parent88d5d9684a51119f62a60c588b2bf468f71fd884 (diff)
parent93bc29a711637c84a4ffc380078277de89af4e6d (diff)
downloadvolse-hubzilla-bad66a1154b3ef6ba639038218317f7ac5bf43d7.tar.gz
volse-hubzilla-bad66a1154b3ef6ba639038218317f7ac5bf43d7.tar.bz2
volse-hubzilla-bad66a1154b3ef6ba639038218317f7ac5bf43d7.zip
Merge remote branch 'friendica/master'
Diffstat (limited to 'include/bb2diaspora.php')
-rw-r--r--include/bb2diaspora.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/bb2diaspora.php b/include/bb2diaspora.php
index 8487f845a..d86ba4543 100644
--- a/include/bb2diaspora.php
+++ b/include/bb2diaspora.php
@@ -221,13 +221,18 @@ function bb2diaspora($Text,$preserve_nl = false) {
$Text = preg_replace("/\<(.*?)(src|href)=(.*?)\&amp\;(.*?)\>/ism",'<$1$2=$3&$4>',$Text);
- $Text = preg_replace('/\[(.*?)\]\((.*?)\\\\_(.*?)\)/ism','[$1]($2_$3)',$Text);
+ $Text = preg_replace_callback('/\[(.*?)\]\((.*?)\)/ism','unescape_underscores_in_links',$Text);
call_hooks('bb2diaspora',$Text);
return $Text;
}
+function unescape_underscores_in_links($m) {
+ $y = str_replace('\\_','_', $m[2]);
+ return('[' . $m[1] . '](' . $y . ')');
+}
+
function format_event_diaspora($ev) {
$a = get_app();