Mercurial > mez_xml
changeset 5:d310e097c6de tip
Replace & with &
author | Thinker K.F. Li <thinker@codemud.net> |
---|---|
date | Sun, 02 Feb 2014 22:12:15 +0800 |
parents | 1727286834b5 |
children | |
files | mez_xml.py tools.py |
diffstat | 2 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- 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()
--- 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