// Create <div/> element where the map is placed in
global $wgExtensionAssetsPath;
- $width_s = (isset($properties['width'])) ? $width . 'px' : '100%';
- $height_s = (isset($properties['height']) ? $height : 450) . 'px';
+ $width_s = (isset($properties['width'])) ? (string) $properties['width'] . 'px' : '100%';
+ $height_s = (isset($properties['height']) ? (string) $properties['height'] : 450) . 'px';
$output = "<div class=\"wrmap\" style=\"width: $width_s; height: $height_s; border-style:none;\" data-img-path=\"$wgExtensionAssetsPath/wrmap/openlayers/img/\">";
$output .= "<script type=\"application/json\">";
$output .= htmlspecialchars($json_string, ENT_NOQUOTES);