]> git.phdru.name Git - bookmarks_db.git/blobdiff - bkmk_objects.py
Fix(Robot): Stop splitting and un-splitting URLs
[bookmarks_db.git] / bkmk_objects.py
index d672bcfc7f2850e0e7c98d5fec7adf7148d50b16..bf5904b3287d2872dd6e871398751bc3118c6700 100644 (file)
@@ -14,7 +14,7 @@ __all__ = ['Folder', 'Bookmark', 'Ruler', 'Walker', 'Writer', 'Robot',
            ]
 
 
-from urllib.parse import urlsplit, quote, unquote
+from urllib.parse import unquote
 import os
 
 BKMK_FORMAT = os.environ.get("BKMK_FORMAT", "MOZILLA")
@@ -58,29 +58,6 @@ class Bookmark(object):
     def __init__(self, href, add_date, last_visit=None, last_modified=None,
                  keyword=None, comment='', icon_href=None, icon=None,
                  charset=None, parser_charset=None):
-        split_results = urlsplit(href)
-        protocol, netloc, path, query, tag = split_results
-        user = split_results.username
-        password = split_results.password
-        host = split_results.hostname
-        port = split_results.port
-
-        if protocol == 'place':
-            href = protocol + ":"
-        else:
-            href = protocol + "://"
-        if user:
-            href += quote(user)
-            if password:
-                href += ':' + quote(password)
-            href += '@'
-        if host:
-            href += host.encode('idna').decode('ascii')
-            if port:
-                href += ':%d' % port
-        if path:
-            href += path
-
         self.href = href
         self.add_date = add_date
         self.last_visit = last_visit