r62562 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r62561‎ | r62562 | r62563 >
Date:00:58, 16 February 2010
Author:jeroendedauw
Status:deferred
Tags:
Comment:
Changes for 0.5.4.
* Added JS var escaping to display_map base class
Modified paths:
  • /trunk/extensions/Maps/ParserFunctions/DisplayMap/Maps_BaseMap.php (modified) (history)

Diff [purge]

Index: trunk/extensions/Maps/ParserFunctions/DisplayMap/Maps_BaseMap.php
@@ -78,8 +78,8 @@
7979 // If the centre is not false, it will be a valid coordinate, which can be used to set the latitude and longitutde.
8080 if ($this->coordinates) {
8181 $this->coordinates = MapsUtils::getLatLon($this->coordinates);
82 - $this->centre_lat = $this->coordinates['lat'];
83 - $this->centre_lon = $this->coordinates['lon'];
 82+ $this->centre_lat = Xml::escapeJsString( $this->coordinates['lat'] );
 83+ $this->centre_lon = Xml::escapeJsString( $this->coordinates['lon'] );
8484 }
8585 else { // If it's false, the coordinate was invalid, or geocoding failed. Either way, the default's should be used.
8686 $this->setCentreDefaults();

Status & tagging log