mirror of
https://github.com/flarum/core.git
synced 2025-08-04 23:47:32 +02:00
Don't store stuff on DOM elements.
This commit is contained in:
committed by
Franz Liedke
parent
42ad490096
commit
571ed8d8e5
@@ -62,13 +62,13 @@ export default class CommentPost extends Post {
|
||||
// If the post content has changed since the last render, we'll run through
|
||||
// all of the <script> tags in the content and evaluate them. This is
|
||||
// necessary because TextFormatter outputs them for e.g. syntax highlighting.
|
||||
if (vnode.dom.contentHtml !== contentHtml) {
|
||||
if (this.contentHtml !== contentHtml) {
|
||||
this.$('.Post-body script').each(function () {
|
||||
eval.call(window, $(this).text());
|
||||
});
|
||||
}
|
||||
|
||||
vnode.dom.contentHtml = contentHtml;
|
||||
this.contentHtml = contentHtml;
|
||||
}
|
||||
|
||||
isEditing() {
|
||||
|
Reference in New Issue
Block a user