diff --git a/pixelocr/formatting.py b/pixelocr/formatting.py index eb75757..b3388d6 100644 --- a/pixelocr/formatting.py +++ b/pixelocr/formatting.py @@ -87,7 +87,8 @@ class HTMLFormat(OutputFormat): def format_tag(self, tag, text): from xml.sax.saxutils import escape + text = escape(text) if tag: - return '<{tag}>{text}'.format(tag=tag, text=escape(text)) + return '<{tag}>{text}'.format(tag=tag, text=text) else: return text