class instance of _escape():
*no docstring available*
no source available
class attributes and properties:
charef_rex: <_sre.SRE_Pattern object at 0x405ca660>
escape: {u'&': u'&', u'"': u'"', u'<': u'<', u"'": u''', u'>': u'>'}
methods:
def __init__(self):
*no docstring available*
arguments:
return value:
<UNKNOWN>
source: xmlobj/misc.py
|
def __init__(self): |
self.escape = { |
u'"' : u'"', u'<' : u'<', u'>' : u'>', |
u'&' : u'&', u"'" : u''', |
} |
self.charef_rex = re.compile(u"|".join(self.escape.keys())) | |
def __call__(self, ustring):
xml-escape the given unicode string.
arguments:
- self: <Instance of Class _escape>
- ustring: <Unicode>
return value:
<Unicode>
source: xmlobj/misc.py
|
def __call__(self, ustring): |
""" xml-escape the given unicode string. """ |
return self.charef_rex.sub(self._replacer, ustring) | |