]> git.mxchange.org Git - friendica.git/blobdiff - src/Content/Text/BBCode.php
Merge remote-tracking branch 'upstream/3.6-rc' into url-shorten-ostatus
[friendica.git] / src / Content / Text / BBCode.php
index 6de12167e521988fe2ca4982d741f1f4426189f9..b0d3a11faffcd05f907f3a409b0b4099ff181b3a 100644 (file)
@@ -1598,8 +1598,8 @@ class BBCode
                if (strpos($text, '[/map]') !== false) {
                        $text = preg_replace_callback(
                                "/\[map\](.*?)\[\/map\]/ism",
-                               function ($match) {
-                                       return str_replace($match[0], '<p class="map">' . Map::byLocation($match[1]) . '</p>', $match[0]);
+                               function ($match) use ($simple_html) {
+                                       return str_replace($match[0], '<p class="map">' . Map::byLocation($match[1], $simple_html) . '</p>', $match[0]);
                                },
                                $text
                        );
@@ -1607,14 +1607,14 @@ class BBCode
                if (strpos($text, '[map=') !== false) {
                        $text = preg_replace_callback(
                                "/\[map=(.*?)\]/ism",
-                               function ($match) {
-                                       return str_replace($match[0], '<p class="map">' . Map::byCoordinates(str_replace('/', ' ', $match[1])) . '</p>', $match[0]);
+                               function ($match) use ($simple_html) {
+                                       return str_replace($match[0], '<p class="map">' . Map::byCoordinates(str_replace('/', ' ', $match[1]), $simple_html) . '</p>', $match[0]);
                                },
                                $text
                        );
                }
                if (strpos($text, '[map]') !== false) {
-                       $text = preg_replace("/\[map\]/", '<div class="map"></div>', $text);
+                       $text = preg_replace("/\[map\]/", '<p class="map"></p>', $text);
                }
 
                // Check for headers