aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorzotlabs <mike@macgirvin.com>2016-11-19 14:16:38 -0800
committerzotlabs <mike@macgirvin.com>2016-11-19 14:16:38 -0800
commitdda2ea8fed7e69d5382aa506d5b8324776e095aa (patch)
tree87eb5c6555e970ea29ae260283c55243222fc00a
parent2293f9dad660875bc573471f55c7981c10c81c2f (diff)
downloadvolse-hubzilla-dda2ea8fed7e69d5382aa506d5b8324776e095aa.tar.gz
volse-hubzilla-dda2ea8fed7e69d5382aa506d5b8324776e095aa.tar.bz2
volse-hubzilla-dda2ea8fed7e69d5382aa506d5b8324776e095aa.zip
Do not render maps for Diaspora destinations.
-rw-r--r--include/bb2diaspora.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/bb2diaspora.php b/include/bb2diaspora.php
index da02d6cac..e6c97a750 100644
--- a/include/bb2diaspora.php
+++ b/include/bb2diaspora.php
@@ -427,6 +427,12 @@ function bb2diaspora($Text,$preserve_nl = false, $fordiaspora = true) {
$Text = preg_replace_callback('/\@\!?\[([zu])rl\=(\w+.*?)\](\w+.*?)\[\/([zu])rl\]/i', 'bb2dmention_callback', $Text);
+ // strip map tags, as the rendering is performed in bbcode() and the resulting output
+ // is not compatible with Diaspora (at least in the case of openstreetmap and probably
+ // due to the inclusion of an html iframe)
+
+ $Text = preg_replace("/\[map\=(.*?)\]/ism", '$1', $Text);
+ $Text = preg_replace("/\[map\](.*?)\[\/map\]/ism", '$1', $Text);
// Converting images with size parameters to simple images. Markdown doesn't know it.
$Text = preg_replace("/\[img\=([0-9]*)x([0-9]*)\](.*?)\[\/img\]/ism", '[img]$3[/img]', $Text);