Escape single and double quotes in export format
authorArt Cancro <ajc@citadel.org>
Tue, 22 Feb 2011 21:06:36 +0000 (16:06 -0500)
committerArt Cancro <ajc@citadel.org>
Tue, 22 Feb 2011 23:34:05 +0000 (18:34 -0500)
(cherry picked from commit cbd9bcf9a70f48fbb6d85b0a8eab837ebe1838ce)

citadel/modules/migrate/serv_migrate.c

index 9b997e132c9b815d4301dffbbc0caeae5ef4716a..4eeb576e5955ac9ebbe8d59362c80a88147dc0ab 100644 (file)
@@ -86,8 +86,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);
@@ -95,6 +98,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);
                }