]> git.phdru.name Git - bookmarks_db.git/blobdiff - Writers/bkmk_whtml.py
Fix: convert unicode icon URLs to utf-8
[bookmarks_db.git] / Writers / bkmk_whtml.py
index caf374737b29f3ea873cbe0c9599c931b7d233da..707b52a68becf5bb00db6181fa3645bf2f247aa9 100644 (file)
@@ -51,7 +51,11 @@ class writer_html(Writer):
          self.outfile.write(' LAST_MODIFIED="%s"' % b.last_modified)
       if BKMK_FORMAT == "MOZILLA":
          if b.keyword: self.outfile.write(' SHORTCUTURL="%s"' % b.keyword)
-         if b.icon_href: self.outfile.write(' ICON_URI="%s"' % b.icon_href)
+         if b.icon_href:
+            value = b.icon_href
+            if isinstance(value, unicode):
+               value = value.encode('utf-8')
+            self.outfile.write(' ICON_URI="%s"' % value)
          if b.icon: self.outfile.write(' ICON="%s"' % b.icon)
          if b.charset: self.outfile.write(' LAST_CHARSET="%s"' % b.charset)
       self.outfile.write('>%s</A>\n' % quote_title(b.name))