Mercurial > p > roundup > code
diff roundup/cgi/TAL/XMLParser.py @ 5519:14a61eabcea8
Fixed unicode issues for XML template with Python 2
| author | Christof Meerwald <cmeerw@cmeerw.org> |
|---|---|
| date | Sat, 25 Aug 2018 15:20:38 +0100 |
| parents | 88dbacd11cd1 |
| children |
line wrap: on
line diff
--- a/roundup/cgi/TAL/XMLParser.py Thu Aug 23 07:41:36 2018 +0100 +++ b/roundup/cgi/TAL/XMLParser.py Sat Aug 25 15:20:38 2018 +0100 @@ -49,6 +49,10 @@ def __init__(self, encoding=None): self.parser = p = self.createParser() + # Make sure we don't get fed unicode strings in Python 2 as we + # can't handle those + if hasattr(self.parser, 'returns_unicode'): + self.parser.returns_unicode = False if self.ordered_attributes: try: self.parser.ordered_attributes = self.ordered_attributes
