Quick fix to get problematic strings escaped in XML.

Should convert the whole document generation to use minidom.