Commits

Aleš Erjavec committed 5c6f876

Replaced use of safe_text with xml.sax.saxutils.escape

Comments (0)

Files changed (1)

orangecontrib/bio/widgets/OWQualityControl.py

 from collections import defaultdict
 from contextlib import contextmanager
 from pprint import pprint
+from xml.sax.saxutils import escape
 
 import numpy
 
 import Orange
 from Orange.OrangeWidgets import OWGUI
 from Orange.OrangeWidgets.OWWidget import *
-from Orange.OrangeWidgets.OWItemModels import PyListModel, safe_text
+from Orange.OrangeWidgets.OWItemModels import PyListModel
 from Orange.OrangeWidgets.OWGraphics import GraphicsSimpleTextLayoutItem
 
 from .. import obiExperiments as exp
     text = ""
     if feature.attributes:
         items = feature.attributes.items()
-        items = [(safe_text(key), safe_text(value)) for key, value in items]
+        items = [(escape(key), escape(value)) for key, value in items]
         labels = map("%s = %s".__mod__, items)
-        text += "<b>%s</b><br/>" % safe_text(feature.name)
+        text += "<b>%s</b><br/>" % escape(feature.name)
         text += "<br/>".join(labels)
     return text