Also escape quotes (") in minidom's _write_data.
authorW. Trevor King <wking@drexel.edu>
Mon, 2 Aug 2010 23:35:09 +0000 (19:35 -0400)
committerW. Trevor King <wking@drexel.edu>
Mon, 2 Aug 2010 23:35:09 +0000 (19:35 -0400)
hooke/compat/minidom.py

index 9d9f1a2467ef4fb7f349f8f45523917e9634d2b7..b9ff34368796f1116e8178f77f6de3dfbb03f3c4 100644 (file)
@@ -18,7 +18,7 @@ def _write_data(writer, data, isAttrib=False):
     "Writes datachars to writer."
     if isAttrib:
         data = data.replace("\r", "&#xD;").replace("\n", "&#xA;")
-        data = data.replace("\t", "&#x9;")
+        data = data.replace("\t", "&#x9;").replace('"', "&quot;")
     writer.write(data)
 xml.dom.minidom._write_data = _write_data