Changeset 1892:5c6f87657211 in orange-bioinformatics


Ignore:
Timestamp:
10/17/13 15:14:20 (6 months ago)
Author:
Ales Erjavec <ales.erjavec@…>
Branch:
default
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orangecontrib/bio/widgets/OWQualityControl.py

    r1874 r1892  
    1212from contextlib import contextmanager 
    1313from pprint import pprint 
     14from xml.sax.saxutils import escape 
    1415 
    1516import numpy 
     
    1819from Orange.OrangeWidgets import OWGUI 
    1920from Orange.OrangeWidgets.OWWidget import * 
    20 from Orange.OrangeWidgets.OWItemModels import PyListModel, safe_text 
     21from Orange.OrangeWidgets.OWItemModels import PyListModel 
    2122from Orange.OrangeWidgets.OWGraphics import GraphicsSimpleTextLayoutItem 
    2223 
     
    9697    if feature.attributes: 
    9798        items = feature.attributes.items() 
    98         items = [(safe_text(key), safe_text(value)) for key, value in items] 
     99        items = [(escape(key), escape(value)) for key, value in items] 
    99100        labels = map("%s = %s".__mod__, items) 
    100         text += "<b>%s</b><br/>" % safe_text(feature.name) 
     101        text += "<b>%s</b><br/>" % escape(feature.name) 
    101102        text += "<br/>".join(labels) 
    102103    return text 
Note: See TracChangeset for help on using the changeset viewer.