From c0d5f59d5b2e31302fa4849feeb70d054bd94453 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 22 Apr 2013 18:44:02 +0530 Subject: [PATCH] ... --- src/calibre/ebooks/oeb/base.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/calibre/ebooks/oeb/base.py b/src/calibre/ebooks/oeb/base.py index 21c0c60a55..eb5b0042e7 100644 --- a/src/calibre/ebooks/oeb/base.py +++ b/src/calibre/ebooks/oeb/base.py @@ -361,7 +361,9 @@ URL_SAFE = set('ABCDEFGHIJKLMNOPQRSTUVWXYZ' 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]