From f8bf8afe4a09f0f21db280e34ae58e18d71b9e72 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Fri, 1 Aug 2014 09:37:23 +0900 Subject: [PATCH] Revert "remove urllib.unquote() step in editor" This reverts commit 23cec2d5e994110665862815add56c4a6e7d7791. without other changes, this causes double escaping when editing --- aqt/editor.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/aqt/editor.py b/aqt/editor.py index 9b102b88c..bd509338c 100644 --- a/aqt/editor.py +++ b/aqt/editor.py @@ -449,6 +449,9 @@ class Editor(object): txt = self.mungeHTML(txt) # misbehaving apps may include a null byte in the text txt = txt.replace("\x00", "") + # reverse the url quoting we added to get images to display + txt = unicode(urllib2.unquote( + txt.encode("utf8")), "utf8", "replace") self.note.fields[self.currentField] = txt if not self.addMode: self.note.flush()