diff options
| author | Michael Williamson <mike@zwobble.org> | 2013-12-14 18:09:54 +0000 |
|---|---|---|
| committer | Michael Williamson <mike@zwobble.org> | 2013-12-14 18:09:54 +0000 |
| commit | 5f9f209d6b9971785b6082dcb4276ae2c4ba7859 (patch) | |
| tree | d6ad87d914e5aa9f3c7ae8253ddc7617980ae94f /mammoth | |
| parent | 0c8ee31a154b5e624f207fb1413295ef2bf45417 (diff) | |
Add Python 3.2 support
Diffstat (limited to 'mammoth')
| -rw-r--r-- | mammoth/html_generation.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/mammoth/html_generation.py b/mammoth/html_generation.py index f6f62af..8395a3d 100644 --- a/mammoth/html_generation.py +++ b/mammoth/html_generation.py @@ -45,7 +45,7 @@ class HtmlGenerator(object): self._fragments.append(fragment) def html_string(self): - return u"".join(self._fragments) + return u("").join(self._fragments) class _Element(object): @@ -106,5 +106,9 @@ def _generate_class_attribute(path_element): if sys.version_info[0] == 2: _iteritems = lambda x: x.iteritems() + u = lambda value: unicode(value, "unicode_escape") + else: _iteritems = lambda x: x.items() + u = lambda value: value + |
