diff options
author | zotlabs <mike@macgirvin.com> | 2019-05-09 22:06:32 -0700 |
---|---|---|
committer | zotlabs <mike@macgirvin.com> | 2019-05-09 22:06:32 -0700 |
commit | d7026fe36b2febd71329e8d9512a4305ae8c05c6 (patch) | |
tree | ebae19734413a2f4414b2680ad2aebef50536472 /include | |
parent | b9b65d7dfbf0d5532c93bd7395b5dbbcb8c1b68f (diff) | |
download | volse-hubzilla-d7026fe36b2febd71329e8d9512a4305ae8c05c6.tar.gz volse-hubzilla-d7026fe36b2febd71329e8d9512a4305ae8c05c6.tar.bz2 volse-hubzilla-d7026fe36b2febd71329e8d9512a4305ae8c05c6.zip |
use 'cache' flag to bbcode() on content destined for Zot6. We've seen rendered map HTML in a couple of places and these should never be rendered for outgoing content as they will only be purified on the other end.
Diffstat (limited to 'include')
-rw-r--r-- | include/bbcode.php | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/include/bbcode.php b/include/bbcode.php index 36f943e46..1c153677d 100644 --- a/include/bbcode.php +++ b/include/bbcode.php @@ -987,11 +987,13 @@ function bbcode($Text, $options = []) { // leave open the posibility of [map=something] // this is replaced in prepare_body() which has knowledge of the item location - if (strpos($Text,'[/map]') !== false) { - $Text = preg_replace_callback("/\[map\](.*?)\[\/map\]/ism", 'bb_map_location', $Text); - } - if (strpos($Text,'[map=') !== false) { - $Text = preg_replace_callback("/\[map=(.*?)\]/ism", 'bb_map_coords', $Text); + if (! $cache) { + if (strpos($Text,'[/map]') !== false) { + $Text = preg_replace_callback("/\[map\](.*?)\[\/map\]/ism", 'bb_map_location', $Text); + } + if (strpos($Text,'[map=') !== false) { + $Text = preg_replace_callback("/\[map=(.*?)\]/ism", 'bb_map_coords', $Text); + } } if (strpos($Text,'[map]') !== false) { $Text = preg_replace("/\[map\]/", '<div class="map"></div>', $Text); |