+ else:
+ text = flt(text)
+ # TODO: just work on the tree and let lxml handle escaping.
+ e = etree.Element("x")
+ e.text = text
+ # This whole mixing text with ML is so wrong.
+ output = etree.tostring(e, encoding=unicode)[3:-4]
+ for flt in self.escaped_text_filters:
+ output = flt(output)
+ return output