Aleš Erjavec  committed 5c6f876

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

  • Participants
  • Parent commits d00fa52
  • Branches default

Comments (0)

Files changed (1)

File orangecontrib/bio/widgets/

 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(
+        text += "<b>%s</b><br/>" % escape(
         text += "<br/>".join(labels)
     return text