diff --git a/deluge/ui/gtkui/details_tab.py b/deluge/ui/gtkui/details_tab.py index 83a6ce486..b823383f8 100644 --- a/deluge/ui/gtkui/details_tab.py +++ b/deluge/ui/gtkui/details_tab.py @@ -7,6 +7,7 @@ # See LICENSE for more details. # +import cgi import logging import deluge.component as component @@ -94,10 +95,11 @@ class DetailsTab(Tab): txt = status[widget[2][0]] if widget[0].get_text() != txt: - if widget[2][0] == 'comment' and is_url(txt): - widget[0].set_markup('%s' % (txt, txt.replace('&', '&'))) + txt = cgi.escape(txt) + if widget[2][0] == "comment" and is_url(txt): + widget[0].set_markup('%s' % (txt, txt)) else: - widget[0].set_markup(txt.replace('&', '&')) + widget[0].set_markup(txt) def clear(self): for widget in self.label_widgets: