Changed map output to DOM based output.
authorphilipp <philipp@7aebc617-e5e2-0310-91dc-80fb5f6d2477>
Thu, 24 Oct 2013 16:35:09 +0000 (16:35 +0000)
committerphilipp <philipp@7aebc617-e5e2-0310-91dc-80fb5f6d2477>
Thu, 24 Oct 2013 16:35:09 +0000 (16:35 +0000)
git-svn-id: http://www.winterrodeln.org/svn/servermediawiki/mediawiki_extensions/wrmap/trunk@1750 7aebc617-e5e2-0310-91dc-80fb5f6d2477

wrmap.body.php

index 4b0dc5a9deef4460b15d8f39e250912daf53c2aa..ccb5b802d36a901f15b782792d4ab5d4cf83dc81 100644 (file)
@@ -233,11 +233,9 @@ class WrBaseMap {
 
                // Create <div/> element where the map is placed in
                global $wgExtensionAssetsPath;
-               $output = "<div class=\"wrmap\" style=\"border-style:none;\" data-img-path=\"$wgExtensionAssetsPath/wrmap/openlayers/img/\">";
-               $output .= htmlspecialchars($json_string, ENT_NOQUOTES);
-               $output .= "</div>\n";
-               
-               return array($output, 'markerType' => 'nowiki');
+               $doc = new WrMapDOMDocument();
+               $doc->appendElement('div', array('class' => 'wrmap', 'style' => 'border-style:none;', 'data-img-path' => "$wgExtensionAssetsPath/wrmap/openlayers/img/"))->appendText($json_string);
+               return array($doc->saveHTML($doc->firstChild), 'markerType' => 'nowiki');
        }
 }