1
0
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:
Alexander Skvortsov
2020-09-11 10:33:10 -04:00
committed by Franz Liedke
parent 42ad490096
commit 571ed8d8e5

View File

@@ -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() {