]> git.tdb.fi Git - ext/subsurface.git/commitdiff
Merge branch 'quoting' of git://git.hohndel.org/subsurface
authorLinus Torvalds <torvalds@linux-foundation.org>
Mon, 27 Aug 2012 20:07:47 +0000 (13:07 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Mon, 27 Aug 2012 20:07:47 +0000 (13:07 -0700)
Pull xml quoting fix from Dirk Hohndel.

* 'quoting' of git://git.hohndel.org/subsurface:
  Add single and double quotes to escaped characters in XML output

save-xml.c

index 37d6d062eabf836f188b8cfc2bcd0b6feae0c6a4..6b08c95111977282169a6cef3a10bbe5384d02b7 100644 (file)
@@ -97,6 +97,12 @@ static void quote(FILE *f, const char *text)
                case '&':
                        escape = "&amp;";
                        break;
+               case '\'':
+                       escape = "&apos;";
+                       break;
+               case '\"':
+                       escape = "&quot;";
+                       break;
                }
                fwrite(text, (p - text - 1), 1, f);
                if (!escape)