[PATCH] Quote picture file names when saving XML

Miika Turkia miika.turkia at gmail.com
Tue Dec 9 09:37:49 PST 2014


Fixes #775

Signed-off-by: Miika Turkia <miika.turkia at gmail.com>
---
 save-xml.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/save-xml.c b/save-xml.c
index 7a27129..e4871fb 100644
--- a/save-xml.c
+++ b/save-xml.c
@@ -389,7 +389,7 @@ static void save_dc(struct membuffer *b, struct dive *dive, struct divecomputer
 static void save_picture(struct membuffer *b, struct picture *pic)
 {
 	put_string(b, "  <picture filename='");
-	put_string(b, pic->filename);
+	put_quoted(b, pic->filename, true, false);
 	put_string(b, "'");
 	if (pic->offset.seconds) {
 		int offset = pic->offset.seconds;
-- 
1.9.1



More information about the subsurface mailing list