mirror of
https://github.com/Kozea/Radicale.git
synced 2025-06-26 16:45:52 +00:00
Quote hreferences
RFC 4918 states that they are URIs and RFC 3986 says that URIs must always be in percent-encoded form.
This commit is contained in:
parent
83046c80c4
commit
eb4b513d63
1 changed files with 2 additions and 2 deletions
|
@ -31,7 +31,7 @@ import xml.etree.ElementTree as ET
|
||||||
from collections import OrderedDict
|
from collections import OrderedDict
|
||||||
from datetime import datetime, timedelta, timezone
|
from datetime import datetime, timedelta, timezone
|
||||||
from http import client
|
from http import client
|
||||||
from urllib.parse import unquote, urlparse
|
from urllib.parse import quote, unquote, urlparse
|
||||||
|
|
||||||
from . import storage
|
from . import storage
|
||||||
|
|
||||||
|
@ -104,7 +104,7 @@ def _response(code):
|
||||||
|
|
||||||
def _href(base_prefix, href):
|
def _href(base_prefix, href):
|
||||||
"""Return prefixed href."""
|
"""Return prefixed href."""
|
||||||
return "%s%s" % (base_prefix, href)
|
return quote("%s%s" % (base_prefix, href))
|
||||||
|
|
||||||
|
|
||||||
def _date_to_datetime(date_):
|
def _date_to_datetime(date_):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue