Skip to content
Snippets Groups Projects
Commit de7e2fba authored by kiilerix's avatar kiilerix
Browse files

util: don't encode ':' in url paths

':' has no special meaning in paths, so there is no need for encoding it.

Not encoding ':' makes it easier to test on windows.
parent 23144f06
No related branches found
No related tags found
No related merge requests found
......@@ -1496,7 +1496,7 @@
"""
_safechars = "!~*'()+"
_safepchars = "/!~*'()+"
_safepchars = "/!~*'()+:"
_matchscheme = re.compile(r'^[a-zA-Z0-9+.\-]+:').match
def __init__(self, path, parsequery=True, parsefragment=True):
......@@ -1608,8 +1608,8 @@
Examples:
>>> str(url('http://user:pw@host:80/?foo#bar'))
'http://user:pw@host:80/?foo#bar'
>>> str(url('http://user:pw@host:80/c:/bob?fo:oo#ba:ar'))
'http://user:pw@host:80/c:/bob?fo:oo#ba:ar'
>>> str(url('http://user:pw@host:80/?foo=bar&baz=42'))
'http://user:pw@host:80/?foo=bar&baz=42'
>>> str(url('http://user:pw@host:80/?foo=bar%3dbaz'))
......
......@@ -219,7 +219,7 @@
>>> u
<url scheme: 'file', path: 'f:oo/bar/baz'>
>>> str(u)
'file:f%3Aoo/bar/baz'
'file:f:oo/bar/baz'
>>> u.localpath()
'f:oo/bar/baz'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment