(value, attr=False)
return _xml_escape_re.sub(replace, value)
Escape a string for inclusion in XML.
Escape a string for inclusion in XML.
Escape a string for inclusion in XML .
def _XmlEscape(value, attr=False):
  """ Escape a string for inclusion in XML."""
  def replace(match):
    m = match.string[match.start() : match.end()]
    # don't replace single quotes in attrs
    if attr and m == "'":
      return m
    return _xml_escape_map[m]
  return _xml_escape_re.sub(replace, value)
def _XmlEscape ( value , attr = False ) : def replace ( match ) : m = match . string [ match . start ( ) : match . end ( ) ] # don't replace single quotes in attrs if attr and m == "'" : return m return _xml_escape_map [ m ] return _xml_escape_re . sub ( replace , value )