X-Git-Url: https://git.phdru.name/?a=blobdiff_plain;f=bkmk_objects.py;h=b9dabff1e316a66c36d14a9f3d0911f4b60f6b2c;hb=ac4b52039650cd5533912cda169d275ba8cb44d1;hp=4850261ef529c854708b5eb0437323720ed9d41e;hpb=05f0cc396bc24da45fa1a8b0a79c97c79f399465;p=bookmarks_db.git diff --git a/bkmk_objects.py b/bkmk_objects.py index 4850261..b9dabff 100644 --- a/bkmk_objects.py +++ b/bkmk_objects.py @@ -85,7 +85,7 @@ class Bookmark(object): href += ':' + quote(password) href += '@' if host: - href += host.decode(parser_charset or 'utf-8').encode('idna') + href += host.encode('idna').decode('ascii') if port: href += ':%d' % port if path: @@ -230,8 +230,8 @@ def unquote_title(title): if BKMK_FORMAT == "MOZILLA": from HTMLParser import HTMLParser title = HTMLParser().unescape( - title.replace("&", '&').decode('utf-8')) - title = title.encode('utf-8').replace("'", "'") + title.replace("&", '&')) + title = title.replace("'", "'") return title