mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-04-21 12:23:23 +02:00
...
This commit is contained in:
parent
6dbd826c51
commit
c0d5f59d5b
1 changed files with 3 additions and 1 deletions
|
|
@ -361,7 +361,9 @@ def serialize(data, media_type, pretty_print=False):
|
|||
URL_UNSAFE = [ASCII_CHARS - URL_SAFE, UNIBYTE_CHARS - URL_SAFE]
|
||||
|
||||
def urlquote(href):
|
||||
"""Quote URL-unsafe characters, allowing IRI-safe characters."""
|
||||
""" Quote URL-unsafe characters, allowing IRI-safe characters.
|
||||
That is, this function returns valid IRIs not valid URIs. In particular,
|
||||
IRIs can contain non-ascii characters. """
|
||||
result = []
|
||||
unsafe = 0 if isinstance(href, unicode) else 1
|
||||
unsafe = URL_UNSAFE[unsafe]
|
||||
|
|
|
|||
Loading…
Reference in a new issue