diff --git a/examples/sundials.html b/examples/sundials.html index 9ed3b12788..ca29bcaf05 100644 --- a/examples/sundials.html +++ b/examples/sundials.html @@ -45,10 +45,16 @@ } function onFeatureSelect(feature) { selectedFeature = feature; + // Since KML is user-generated, do naive protection against + // Javascript. + var content = "

"+feature.attributes.name + "

" + feature.attributes.description; + if (content.search(""+feature.attributes.name + "" + feature.attributes.description, + content, null, true, onPopupClose); feature.popup = popup; map.addPopup(popup);