X-Git-Url: https://git.mdrn.pl/librarian.git/blobdiff_plain/1d9833e372425e68597e30e2cb85da17e7d57dc1..893924685f2bc659cb71d7c68501fc3cf1daa0f0:/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."""