correctly decode %-escaped utf8 when pasting (#865)

This commit is contained in:
Damien Elmes 2013-05-16 16:41:20 +09:00
parent e06594a303
commit bbe248698a

View file

@ -1102,7 +1102,8 @@ class EditorWebView(AnkiWebView):
return return
finally: finally:
self.editor.mw.progress.finish() self.editor.mw.progress.finish()
path = namedtmp(os.path.basename(urllib2.unquote(url))) path = unicode(urllib2.unquote(url.encode("utf8")), "utf8")
path = namedtmp(os.path.basename(path))
file = open(path, "wb") file = open(path, "wb")
file.write(filecontents) file.write(filecontents)
file.close() file.close()