From 464a611d8d5dbef8c3d62320f7b89e6c4ffaab53 Mon Sep 17 00:00:00 2001 From: Gehad elrobey Date: Mon, 2 Jun 2014 20:10:54 +0300 Subject: HTML: Better quoting to the export strings Move the quote function to membuffer.c and adding wrappers that call it from both xml and html exporters to get rid of redundancy. Quote the location, buddy, suit, tags and notes This prevents js code from crashing. [Miika Turkia: minor whitespace and code fix] Signed-off-by: Gehad elrobey Signed-off-by: Miika Turkia Signed-off-by: Dirk Hohndel --- worldmap-save.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'worldmap-save.c') diff --git a/worldmap-save.c b/worldmap-save.c index 0b22b554c..0dbc4791f 100644 --- a/worldmap-save.c +++ b/worldmap-save.c @@ -38,7 +38,9 @@ void writeMarkers(struct membuffer *b, const bool selected_only) put_depth(b, dive->maxdepth, translate("gettextFromC", "

Max Depth: "), translate("gettextFromC", " m

")); put_HTML_airtemp(b, dive, translate("gettextFromC", "

Air Temp: "), "

"); put_HTML_watertemp(b, dive, translate("gettextFromC", "

Water Temp : "), "

"); - put_format(b, "

Location : %s

", quote(dive->location)); + put_string(b, "

Location : "); + put_HTML_quoted(b, dive->location); + put_string(b, "

"); put_HTML_notes(b, dive, translate("gettextFromC", "

Notes"), "

"); put_string(b, "

'+''+''});\ninfowindows.push(tempinfowindow);\n"); put_format(b, "google.maps.event.addListener(markers[%d], 'mouseover', function() {\ninfowindows[%d].open(map,markers[%d]);}", dive_no, dive_no, dive_no); -- cgit v1.2.3-70-g09d2