(segment)
| 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) |
no test coverage detected