mirror of
https://github.com/flarum/core.git
synced 2025-08-06 08:27:42 +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
|
// 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
|
// all of the <script> tags in the content and evaluate them. This is
|
||||||
// necessary because TextFormatter outputs them for e.g. syntax highlighting.
|
// 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 () {
|
this.$('.Post-body script').each(function () {
|
||||||
eval.call(window, $(this).text());
|
eval.call(window, $(this).text());
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
vnode.dom.contentHtml = contentHtml;
|
this.contentHtml = contentHtml;
|
||||||
}
|
}
|
||||||
|
|
||||||
isEditing() {
|
isEditing() {
|
||||||
|
Reference in New Issue
Block a user