Small fix for <> appearing in text format.

This commit is contained in:
Jim Miller 2018-08-26 15:59:37 -05:00
parent 769d5a77c2
commit 279b3105ee

View file

@ -131,7 +131,7 @@ def removeEntities(text, space_only=False, remove_all_entities=False):
text = _replaceNotEntities(text)
if remove_all_entities:
text = text.replace('&lt;', '<').replace('&gt;', '>').replace('&amp;', '&')
text = text.replace('&lt', '<').replace('&gt', '>').replace('&amp;', '&')
else:
# &lt; &gt; and &amp; are the only html entities allowed in xhtml, put those back.
# They come out as &lt because _replaceNotEntities removes the ';'.