diff --git a/aqt/editor.py b/aqt/editor.py index d0be1543c..3c85c6fba 100644 --- a/aqt/editor.py +++ b/aqt/editor.py @@ -477,7 +477,8 @@ class Editor(object): # 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") + txt = unicode(urllib2.unquote( + txt.encode("utf8")), "utf8", "replace") self.note.fields[self.currentField] = txt self.mw.requireReset() if not self.addMode: