Mercurial > genshi > mirror
diff genshi/input.py @ 998:44fb098722ac stable-0.7.x
Merge r1210 and r1212 from trunk (remove unnecessary isinstance checks and skip mako benchmarks if mako isn't installed).
author | hodgestar |
---|---|
date | Sat, 26 Jan 2013 17:34:51 +0000 |
parents | 9e30a7234290 |
children |
line wrap: on
line diff
--- a/genshi/input.py +++ b/genshi/input.py @@ -366,9 +366,7 @@ fixed_attrib = [] for name, value in attrib: # Fixup minimized attributes if value is None: - value = unicode(name) - elif not isinstance(value, unicode): - value = value.decode(self.encoding, 'replace') + value = name fixed_attrib.append((QName(name), stripentities(value))) self._enqueue(START, (QName(tag), Attrs(fixed_attrib))) @@ -386,8 +384,6 @@ break def handle_data(self, text): - if not isinstance(text, unicode): - text = text.decode(self.encoding, 'replace') self._enqueue(TEXT, text) def handle_charref(self, name):