X-Git-Url: https://git.mdrn.pl/librarian.git/blobdiff_plain/fcaf06749607b02e11e4edc3b8ae8313e1a1ef91..bfdf1fb55d9a5ee7be5a16ef73e6237ad949ddcb:/librarian/xmlutils.py diff --git a/librarian/xmlutils.py b/librarian/xmlutils.py index 340ee83..9e921a2 100644 --- a/librarian/xmlutils.py +++ b/librarian/xmlutils.py @@ -26,7 +26,10 @@ class Xmill(object): if text is None: return None text = flt(text) - return text + # TODO: just work on the tree and let lxml handle escaping. + e = etree.Element("x") + e.text = text + return etree.tostring(e, encoding=unicode)[3:-4] def generate(self, document): """Generate text from node using handlers defined in class."""