mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
filter html editor html
This commit is contained in:
parent
e177fae220
commit
0bb4633b14
1 changed files with 5 additions and 2 deletions
|
@ -515,8 +515,11 @@ class Editor(object):
|
|||
form.textEdit.setPlainText(self.note.fields[self.currentField])
|
||||
form.textEdit.moveCursor(QTextCursor.End)
|
||||
d.exec_()
|
||||
self.note.fields[self.currentField] = unicode(
|
||||
form.textEdit.toPlainText())
|
||||
html = form.textEdit.toPlainText()
|
||||
# filter html through beautifulsoup so we can strip out things like a
|
||||
# leading </div>
|
||||
html = unicode(BeautifulSoup(html))
|
||||
self.note.fields[self.currentField] = html
|
||||
self.loadNote()
|
||||
|
||||
# Tag & deck handling
|
||||
|
|
Loading…
Reference in a new issue