Fix escaping text outside tags.
This commit is contained in:
parent
1c6509efad
commit
4dd082dffd
1 changed files with 2 additions and 1 deletions
|
|
@ -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}</{tag}>'.format(tag=tag, text=escape(text))
|
||||
return '<{tag}>{text}</{tag}>'.format(tag=tag, text=text)
|
||||
else:
|
||||
return text
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue