mirror of
https://github.com/ankitects/anki.git
synced 2025-09-20 06:52:21 -04:00
Merge pull request #273 from zjosua/reinstate-mungehtml
Reinstate mungeHTML in editor.py
This commit is contained in:
commit
57d566d670
1 changed files with 5 additions and 0 deletions
|
@ -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
|
||||
######################################################################
|
||||
|
||||
|
|
Loading…
Reference in a new issue