Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Make tidy deal with utf8 properly. Oops.

  • Loading branch information...
commit 40194b17c06a0fb0696eaaeaf1db9d10d94b5d23 1 parent 7959feb
Magnus Hagander authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  generator.py
3  generator.py
View
@@ -28,6 +28,7 @@ def __init__(self,db):
output_xhtml=1,
show_body_only=1,
clean=1,
+ char_encoding='utf8',
)
self.items = []
self.feeds = []
@@ -73,7 +74,7 @@ def WriteFromTemplate(self, templatename, outputname):
def TruncateAndCleanDescription(self, txt):
# First apply Tidy
- txt = unicode(tidy.parseString(txt.encode('utf-8'), **self.tidyopts))
+ txt = unicode(str(tidy.parseString(txt.encode('utf-8'), **self.tidyopts)),'utf8')
# Then truncate as necessary
ht = HtmlTruncator(1024)
Please sign in to comment.
Something went wrong with that request. Please try again.