Code Repositories xandikos / e019634
Only check for duplicate slashes in path part of URL. Fixes #81 Jelmer Vernooń≥ 7 months ago
1 changed file(s) with 3 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
10811081
10821082
10831083 def create_href(href, base_href=None):
1084 if '//' in href:
1085 logging.warning('invalidly formatted href: %s' % href)
1084 parsed_url = urllib.parse.urlparse(href)
1085 if '//' in parsed_url.path:
1086 logging.warning('invalidly formatted href: %s', href)
10861087 et = ET.Element('{DAV:}href')
10871088 if base_href is not None:
10881089 href = urllib.parse.urljoin(ensure_trailing_slash(base_href), href)