summaryrefslogtreecommitdiffstats
path: root/worldmap-save.c
diff options
context:
space:
mode:
authorGravatar Gehad elrobey <gehadelrobey@gmail.com>2014-06-02 20:10:54 +0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-06-06 10:08:09 -0700
commit464a611d8d5dbef8c3d62320f7b89e6c4ffaab53 (patch)
treeb4c5e4a1221a9a3576215677ce762d5daf1bea7c /worldmap-save.c
parent1120379b2bcdc2d941bb2e036bacf34d226e74a1 (diff)
downloadsubsurface-464a611d8d5dbef8c3d62320f7b89e6c4ffaab53.tar.gz
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 <gehadelrobey@gmail.com> Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'worldmap-save.c')
-rw-r--r--worldmap-save.c4
1 files changed, 3 insertions, 1 deletions
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", "<p>Max Depth: "), translate("gettextFromC", " m</p>"));
put_HTML_airtemp(b, dive, translate("gettextFromC", "<p>Air Temp: "), "</p>");
put_HTML_watertemp(b, dive, translate("gettextFromC", "<p>Water Temp : "), "</p>");
- put_format(b, "<p>Location : <b>%s</b></p>", quote(dive->location));
+ put_string(b, "<p>Location : <b>");
+ put_HTML_quoted(b, dive->location);
+ put_string(b, "</b></p>");
put_HTML_notes(b, dive, translate("gettextFromC", "<p> Notes"), " </p>");
put_string(b, "</p>'+'</div>'+'</div>'});\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);