From 82ac1bdfe0553002ebe27e6f50d53f25594e00ff Mon Sep 17 00:00:00 2001 From: Calum Lind Date: Sun, 18 Oct 2015 18:24:53 +0100 Subject: [PATCH] Use xml.sax instead of cgi for escaping --- deluge/ui/gtkui/details_tab.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/deluge/ui/gtkui/details_tab.py b/deluge/ui/gtkui/details_tab.py index b823383f8..567727c1b 100644 --- a/deluge/ui/gtkui/details_tab.py +++ b/deluge/ui/gtkui/details_tab.py @@ -7,8 +7,8 @@ # See LICENSE for more details. # -import cgi import logging +from xml.sax.saxutils import escape as xml_escape import deluge.component as component from deluge.common import fdate, fsize, is_url @@ -93,9 +93,9 @@ class DetailsTab(Tab): txt = widget[1](*args) else: txt = status[widget[2][0]] + txt = xml_escape(txt) if widget[0].get_text() != txt: - txt = cgi.escape(txt) if widget[2][0] == "comment" and is_url(txt): widget[0].set_markup('%s' % (txt, txt)) else: