diff --git a/mitterlib/ui/ui_pygtk.py b/mitterlib/ui/ui_pygtk.py index 9cd0099..18d6789 100644 --- a/mitterlib/ui/ui_pygtk.py +++ b/mitterlib/ui/ui_pygtk.py @@ -29,9 +29,10 @@ import re import urllib2 import webbrowser +from cgi import escape as html_escape + from mitterlib.ui.helpers.image_helpers import find_image from mitterlib import htmlize - from mitterlib.constants import gpl_3, version from mitterlib.ui.helpers import timesince @@ -578,9 +579,7 @@ class Interface(object): time = timesince.timesince(data.message_time) # unescape escaped entities that pango is not okay with - message = re.sub(r'&', r'&', message) - message = re.sub(r'<', r'<', message) - message = re.sub(r'>', r'>', message) + message = html_escape(message) # highlight URLs mask = r'\1' % (