MCPcopy
hub / github.com/django/django / unquote_quote

Function unquote_quote

django/utils/html.py:246–250  ·  view source on GitHub ↗
(segment)

Source from the content-addressed store, hash-verified

244 """Quote a URL if it isn't already quoted."""
245
246 def unquote_quote(segment):
247 segment = unquote(segment)
248 # Tilde is part of RFC 3986 Section 2.3 Unreserved Characters,
249 # see also https://bugs.python.org/issue16285
250 return quote(segment, safe=RFC3986_SUBDELIMS + RFC3986_GENDELIMS + "~")
251
252 try:
253 scheme, netloc, path, query, fragment = urlsplit(url)

Callers 1

smart_urlquoteFunction · 0.85

Calls 2

unquoteFunction · 0.85
quoteFunction · 0.85

Tested by

no test coverage detected