Ooops, it broke the first two required //
This commit is contained in:
parent
17cd144e92
commit
2b7761fe9b
1 changed files with 2 additions and 3 deletions
|
|
@ -53,9 +53,6 @@ def fixurl(url):
|
|||
# remove javascript crap
|
||||
url = url.replace('/#!/', '/')
|
||||
|
||||
# while valid, it is most likely an error
|
||||
url = url.replace('//', '/')
|
||||
|
||||
# parse it
|
||||
parsed = urlparse.urlsplit(url)
|
||||
|
||||
|
|
@ -74,6 +71,8 @@ def fixurl(url):
|
|||
colon2 = colon2.encode('utf8')
|
||||
port = port.encode('utf8')
|
||||
path = '/'.join(pce.encode('utf8') for pce in parsed.path.split('/'))
|
||||
# while valid, it is most likely an error
|
||||
path = path.replace('//', '/')
|
||||
query = parsed.query.encode('utf8')
|
||||
fragment = parsed.fragment.encode('utf8')
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue