Merge pull request #273 from zjosua/reinstate-mungehtml

Reinstate mungeHTML in editor.py
This commit is contained in:
Damien Elmes 2019-01-29 08:26:47 +10:00 committed by GitHub
commit 57d566d670
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -256,6 +256,7 @@ class Editor:
return
txt = urllib.parse.unquote(txt)
txt = unicodedata.normalize("NFC", txt)
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
@ -287,6 +288,10 @@ class Editor:
else:
print("uncaught cmd", cmd)
def mungeHTML(self, txt):
txt = re.sub(r"<br>$", "", txt)
return txt
# Setting/unsetting the current note
######################################################################