From b37a356b5ec05ee289d4cbf82fc23cb991e09e0d Mon Sep 17 00:00:00 2001 From: "jeremy@jermolene.com" Date: Tue, 20 Dec 2022 16:45:29 +0000 Subject: [PATCH] Crash with <$genesis $type="" /> Fixes #7140 --- core/modules/widgets/element.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/modules/widgets/element.js b/core/modules/widgets/element.js index c3d6c96d9..1f6fc6c09 100755 --- a/core/modules/widgets/element.js +++ b/core/modules/widgets/element.js @@ -30,7 +30,7 @@ ElementWidget.prototype.render = function(parent,nextSibling) { this.parentDomNode = parent; this.computeAttributes(); // Neuter blacklisted elements - this.tag = this.parseTreeNode.tag; + this.tag = this.parseTreeNode.tag || "span"; if($tw.config.htmlUnsafeElements.indexOf(this.tag) !== -1) { this.tag = "safe-" + this.tag; }