Sanitize track name (#312)
to prevent code in GPX getting executed like this:
<name><img src="xyz" onerror="alert('script executed')"></name>
This commit is contained in:
parent
dd4eb6c406
commit
9500481df0
3 changed files with 11 additions and 11 deletions
|
|
@ -284,7 +284,7 @@ BR.routeLoader = function(map, layersControl, routing, pois) {
|
|||
addTrackOverlay: function(geoJSON) {
|
||||
this._trackLayer = L.geoJSON(geoJSON, BR.Track.getGeoJsonOptions(layersControl)).addTo(map);
|
||||
|
||||
layersControl.addOverlay(this._trackLayer, this._layerName);
|
||||
layersControl.addOverlay(this._trackLayer, BR.Util.sanitizeHTMLContent(this._layerName));
|
||||
|
||||
this._bounds = this._trackLayer.getBounds();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue