mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 06:22:22 -04:00
handle % as well (#823)
This commit is contained in:
parent
93717df30b
commit
faddc59232
1 changed files with 2 additions and 0 deletions
|
@ -1099,6 +1099,7 @@ class EditorWebView(AnkiWebView):
|
|||
return
|
||||
if url.lower().startswith("file://"):
|
||||
url = url.replace("#", "%23")
|
||||
url = url.replace("%", "%25")
|
||||
# fetch it into a temporary folder
|
||||
self.editor.mw.progress.start(
|
||||
immediate=True, parent=self.editor.parentWindow)
|
||||
|
@ -1113,6 +1114,7 @@ class EditorWebView(AnkiWebView):
|
|||
self.editor.mw.progress.finish()
|
||||
path = unicode(urllib2.unquote(url.encode("utf8")), "utf8")
|
||||
path = path.replace("#", "")
|
||||
path = path.replace("%", "")
|
||||
path = namedtmp(os.path.basename(path))
|
||||
file = open(path, "wb")
|
||||
file.write(filecontents)
|
||||
|
|
Loading…
Reference in a new issue