mirror of
https://github.com/Hopiu/linkchecker.git
synced 2026-04-20 06:10:59 +00:00
dont quote AT sign in paths
git-svn-id: https://linkchecker.svn.sourceforge.net/svnroot/linkchecker/trunk/linkchecker@1587 e7d03fd6-7b0d-0410-9947-9c21f3af8025
This commit is contained in:
parent
b361505a84
commit
d18de2a6fb
2 changed files with 6 additions and 2 deletions
|
|
@ -233,7 +233,11 @@ class TestUrl (unittest.TestCase):
|
|||
"""test norming of other schemes"""
|
||||
# no netloc and no path
|
||||
url = 'mailto:'
|
||||
nurl = 'mailto:'
|
||||
nurl = url
|
||||
self.assertEqual(linkcheck.url.url_norm(url), nurl)
|
||||
# standard email
|
||||
url = 'mailto:user@www.imadoofus.org'
|
||||
nurl = url
|
||||
self.assertEqual(linkcheck.url.url_norm(url), nurl)
|
||||
# no netloc and no path
|
||||
url = 'news:'
|
||||
|
|
|
|||
|
|
@ -194,7 +194,7 @@ def url_norm (url):
|
|||
# quote parts again
|
||||
urlparts[0] = urllib.quote(urlparts[0]) # scheme
|
||||
urlparts[1] = urllib.quote(urlparts[1], ':@') # host
|
||||
nopathquote = ';/=,~*-+()'
|
||||
nopathquote = ';/=,~*-+()@'
|
||||
urlparts[2] = urllib.quote(urlparts[2], nopathquote) # path
|
||||
res = urlparse.urlunsplit(urlparts)
|
||||
if url.endswith('#') and not urlparts[4]:
|
||||
|
|
|
|||
Loading…
Reference in a new issue