commit eb5aced89068046437c56800daebc97625dcee47 parent 9d459cedc6001df077d8701a35eeccdd91908c81 Author: Henry Unite <unitehenry@gmail.com> Date: Wed, 2 Sep 2020 10:35:49 -0400 strip scripts in getContent Diffstat:
| M | src/striveneditor.js | | | 5 | +++-- |
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/striveneditor.js b/src/striveneditor.js @@ -1982,11 +1982,12 @@ export default class StrivenEditor { */ getContent() { const se = this; - const text = this.body.textContent; + const body = se.pruneScripts(se.body); + const text = body.textContent; if (text || se.body.getElementsByTagName('img').length) { const htmlView = !!se.editor.querySelector('.se-html'); - return htmlView ? text : se.body.innerHTML; + return htmlView ? text : body.innerHTML; } else { return null; }