]> git.sommitrealweird.co.uk Git - rss2maildir.git/commitdiff
Unicode handling of URLs fix
authorBrett Parker <iDunno@sommitrealweird.co.uk>
Fri, 25 Jan 2008 08:31:38 +0000 (08:31 +0000)
committerBrett Parker <iDunno@sommitrealweird.co.uk>
Fri, 25 Jan 2008 08:31:38 +0000 (08:31 +0000)
rss2maildir.py

index b91428674ab036254d65a9cefb63fd04aa2db9c7..2af32bc9105a49201e2bbba49d87b5e2cbcda1da 100755 (executable)
@@ -151,7 +151,7 @@ class HTML2Text(HTMLParser):
             elif tag_name == u'a':
                 for attr in attrs:
                     if attr[0].lower() == u'href':
             elif tag_name == u'a':
                 for attr in attrs:
                     if attr[0].lower() == u'href':
-                        self.urls.append(attr[1])
+                        self.urls.append(attr[1].decode('utf-8'))
                 self.curdata = self.curdata + u'`'
                 self.opentags.append(tag_name)
                 return
                 self.curdata = self.curdata + u'`'
                 self.opentags.append(tag_name)
                 return