Escape single and double quotes in export format
authorArt Cancro <ajc@citadel.org>
Tue, 22 Feb 2011 21:06:36 +0000 (16:06 -0500)
committerWilfried Goesgens <dothebart@citadel.org>
Sun, 4 Sep 2011 14:43:49 +0000 (14:43 +0000)
citadel/modules/migrate/serv_migrate.c

index 5bb59d679fd8a819f51f8fed82fc75d28cd8d544..d8a742acd5f04b3aa62fd3e089e06d097b90b456 100644 (file)
@@ -84,8 +84,11 @@ void xml_strout(char *str) {
        char *c = str;
 
        while (*c != 0) {
-               if (*c == '&') {
-                       client_write("&amp;", 5);
+               if (*c == '\"') {
+                       client_write("&quot;", 4);
+               }
+               else if (*c == '\'') {
+                       client_write("&apos;", 4);
                }
                else if (*c == '<') {
                        client_write("&lt;", 4);
@@ -93,6 +96,9 @@ void xml_strout(char *str) {
                else if (*c == '>') {
                        client_write("&gt;", 4);
                }
+               else if (*c == '&') {
+                       client_write("&amp;", 5);
+               }
                else {
                        client_write(c, 1);
                }