diff --git a/src/plugins/view/geoview.py b/src/plugins/view/geoview.py index 8cd05a0e3..4fac5f86d 100644 --- a/src/plugins/view/geoview.py +++ b/src/plugins/view/geoview.py @@ -228,6 +228,14 @@ def _make_callback(func, val): """ return lambda x: func(val) +def _escape(text): + """ + return the text with some characters translated : " & + """ + text = text.replace('&','\\&') + text = text.replace('"','\\"') + return text + #------------------------------------------------------------------------- # # GeoView @@ -1566,7 +1574,7 @@ class GeoView(HtmlView): self.mapview.write("my_marker = new Marker(point);") self.mapview.write("gmarkers[%d]=my_marker;" % ind ) self.mapview.write("my_marker.setLabel") - self.mapview.write("(\"%s\");" % mark[0]) + self.mapview.write("(\"%s\");" % _escape(mark[0])) self.yearinmarker.append(mark[7]) divclose = False differtype = False @@ -1574,25 +1582,25 @@ class GeoView(HtmlView): savetype = mark[8] self.mapview.write("my_marker.setInfoBubble(\"