mirror of
https://github.com/bringout/oca-ocb-core.git
synced 2026-04-20 12:32:02 +02:00
19.0 vanilla
This commit is contained in:
parent
d1963a3c3a
commit
2d3ee4855a
7430 changed files with 2687981 additions and 2965473 deletions
|
|
@ -1,6 +1,5 @@
|
|||
import re
|
||||
import urllib.parse
|
||||
from urllib.parse import _WHATWG_C0_CONTROL_OR_SPACE
|
||||
|
||||
__all__ = ['urljoin']
|
||||
|
||||
|
|
@ -63,7 +62,7 @@ def urljoin(base: str, extra: str) -> str:
|
|||
if e_path:
|
||||
# prevent urljoin("/", "\\example.com/") to resolve as absolute to "//example.com/" in a browser redirect
|
||||
# https://github.com/mozilla-firefox/firefox/blob/5e81b64f4ed88b610eb332e103744d68ee8b6c0d/netwerk/base/nsStandardURL.cpp#L2386-L2388
|
||||
e_path = e_path.lstrip('/\\' + _WHATWG_C0_CONTROL_OR_SPACE)
|
||||
e_path = e_path.lstrip('/\\\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\x0b\x0c\r\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f ')
|
||||
path = f'{path}/{e_path}'
|
||||
|
||||
# normalize: foo//bar -> foo/bar
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue