]> git.tdb.fi Git - ext/subsurface.git/blobdiff - save-xml.c
Add single and double quotes to escaped characters in XML output
[ext/subsurface.git] / save-xml.c
index ed55c022d4bf971e1d10802cf38c5399830ea98d..6b08c95111977282169a6cef3a10bbe5384d02b7 100644 (file)
@@ -97,6 +97,12 @@ static void quote(FILE *f, const char *text)
                case '&':
                        escape = "&";
                        break;
+               case '\'':
+                       escape = "'";
+                       break;
+               case '\"':
+                       escape = """;
+                       break;
                }
                fwrite(text, (p - text - 1), 1, f);
                if (!escape)
@@ -183,6 +189,7 @@ static void save_overview(FILE *f, struct dive *dive)
        show_utf8(f, dive->divemaster, "  <divemaster>","</divemaster>\n");
        show_utf8(f, dive->buddy, "  <buddy>","</buddy>\n");
        show_utf8(f, dive->notes, "  <notes>","</notes>\n");
+       show_utf8(f, dive->suit, "  <suit>","</suit>\n");
 }
 
 static void save_cylinder_info(FILE *f, struct dive *dive)