summaryrefslogtreecommitdiffstats
path: root/worldmap-save.c
diff options
context:
space:
mode:
authorGravatar Miika Turkia <miika.turkia@gmail.com>2014-05-25 08:27:47 +0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2014-05-25 05:39:04 -0700
commit8f17caeedcf6c39530e72411a28ec53a4ecd330e (patch)
treeadbc78f2a5667bdb4a752a149104684b3ff3701a /worldmap-save.c
parentb88e6dc5fa44049e56c80e02fc6778c0f18c670b (diff)
downloadsubsurface-8f17caeedcf6c39530e72411a28ec53a4ecd330e.tar.gz
Location must be quoted on worldmap export
User supplied text fields must be quoted on worldmap export. Without quoting the HTML is broken e.g. with location "Angel's Window" 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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/worldmap-save.c b/worldmap-save.c
index e7448fd4e..c223ca333 100644
--- a/worldmap-save.c
+++ b/worldmap-save.c
@@ -99,7 +99,7 @@ void writeMarkers(struct membuffer *b, const bool selected_only)
put_degrees(b, dive->latitude, "temp = new google.maps.Marker({position: new google.maps.LatLng(", "");
put_degrees(b, dive->longitude, ",", ")});\n");
put_string(b, "markers.push(temp);\ntempinfowindow = new google.maps.InfoWindow({content: '<div id=\"content\">'+'<div id=\"siteNotice\">'+'</div>'+'<div id=\"bodyContent\">");
- put_format(b, "<p><b>%s</b></p>", dive->location);
+ put_format(b, "<p><b>%s</b></p>", quote(dive->location));
put_HTML_date(b, dive);
put_duration(b, dive->duration, "<p>Duration: ", " min</p>");
put_depth(b, dive->maxdepth, "<p>Max Depth: ", " m</p>");