# HG changeset patch # User Thinker K.F. Li # Date 1391350335 -28800 # Node ID d310e097c6de93e7bbe78a68fc5e098ebd52a5d0 # Parent 1727286834b58da15a27e5af8edab1201c4fdce1 Replace & with & diff -r 1727286834b5 -r d310e097c6de mez_xml.py --- a/mez_xml.py Fri Oct 29 17:49:10 2010 +0800 +++ b/mez_xml.py Sun Feb 02 22:12:15 2014 +0800 @@ -25,7 +25,7 @@ self.dig() self.output_cmd_line('def __init__(self, ofo):') self.dig() - self.output_cmd_line('super(%s, self).__init__()' % (self.cname,)) + self.output_cmd_line('super(self.__class__, self).__init__()') self.output_cmd_line('self.ofo = ofo') self.output_cmd_line('pass') self.back() diff -r 1727286834b5 -r d310e097c6de tools.py --- a/tools.py Fri Oct 29 17:49:10 2010 +0800 +++ b/tools.py Sun Feb 02 22:12:15 2014 +0800 @@ -82,7 +82,7 @@ self._committed = False self._ready = False pass - + def __exit__(self, exc_type, exc_value, traceback): if self._committed: self._root({}, self._rootns) @@ -127,7 +127,7 @@ import types if not (isinstance(data, types.StringTypes) and self.safe): return str(data) - return str(data.replace('<', '<').replace('>', '>')) + return str(data.replace('&', '&').replace('<', '<').replace('>', '>')) def _esc_cdata(self, data): import types