From 78ffa63ac56331d98e2a10c58d64ddc9946b0691 Mon Sep 17 00:00:00 2001 From: pmario Date: Sat, 4 May 2024 15:57:51 +0200 Subject: [PATCH] remove comments --- core/modules/editor/engines/framed.js | 3 --- core/modules/editor/engines/simple.js | 4 ---- core/modules/widgets/button.js | 3 --- core/modules/widgets/draggable.js | 3 --- core/modules/widgets/droppable.js | 3 --- core/modules/widgets/element.js | 3 --- core/modules/widgets/eventcatcher.js | 3 --- core/modules/widgets/keyboard.js | 3 --- core/modules/widgets/link.js | 3 --- core/modules/widgets/reveal.js | 3 --- 10 files changed, 31 deletions(-) diff --git a/core/modules/editor/engines/framed.js b/core/modules/editor/engines/framed.js index 3a5adea75..f37080082 100644 --- a/core/modules/editor/engines/framed.js +++ b/core/modules/editor/engines/framed.js @@ -49,9 +49,6 @@ function FramedEngine(options) { this.widget.domNodes.push(this.iframeNode); // Construct the textarea or input node var tag = $tw.utils.makeTagNameSafe(this.widget.editTag, "input"); - // if($tw.config.htmlUnsafeElements.indexOf(tag) !== -1) { - // tag = "input"; - // } this.domNode = this.iframeDoc.createElement(tag); // Set the text if(this.widget.editTag === "textarea") { diff --git a/core/modules/editor/engines/simple.js b/core/modules/editor/engines/simple.js index fbd02399b..cdb378816 100644 --- a/core/modules/editor/engines/simple.js +++ b/core/modules/editor/engines/simple.js @@ -23,10 +23,6 @@ function SimpleEngine(options) { this.nextSibling = options.nextSibling; // Construct the textarea or input node var tag = $tw.utils.makeTagNameSafe(this.widget.editTag,"input"); - // var tag = this.widget.editTag; - // if($tw.config.htmlUnsafeElements.indexOf(tag) !== -1) { - // tag = "input"; - // } this.domNode = this.widget.document.createElement(tag); // Set the text if(this.widget.editTag === "textarea") { diff --git a/core/modules/widgets/button.js b/core/modules/widgets/button.js index 712c15c26..9bae74238 100644 --- a/core/modules/widgets/button.js +++ b/core/modules/widgets/button.js @@ -38,9 +38,6 @@ ButtonWidget.prototype.render = function(parent,nextSibling) { this.computeAttributes(); this.execute(); // Create element - // if(this.buttonTag && $tw.config.htmlUnsafeElements.indexOf(this.buttonTag) === -1) { - // tag = this.buttonTag; - // } tag = $tw.utils.makeTagNameSafe(this.buttonTag,tag) domNode = this.document.createElement(tag); this.domNode = domNode; diff --git a/core/modules/widgets/draggable.js b/core/modules/widgets/draggable.js index 628c2cbff..9bc30b81c 100644 --- a/core/modules/widgets/draggable.js +++ b/core/modules/widgets/draggable.js @@ -39,9 +39,6 @@ DraggableWidget.prototype.render = function(parent,nextSibling) { this.execute(); // Sanitise the specified tag tag = $tw.utils.makeTagNameSafe(this.draggableTag,"div"); - // if($tw.config.htmlUnsafeElements.indexOf(tag) !== -1) { - // tag = "div"; - // } // Create our element domNode = this.document.createElement(tag); // Assign classes diff --git a/core/modules/widgets/droppable.js b/core/modules/widgets/droppable.js index e9ede0e50..5cbe50b7a 100644 --- a/core/modules/widgets/droppable.js +++ b/core/modules/widgets/droppable.js @@ -36,9 +36,6 @@ DroppableWidget.prototype.render = function(parent,nextSibling) { this.computeAttributes(); this.execute(); tag = $tw.utils.makeTagNameSafe(this.droppableTag,tag); - // if(this.droppableTag && $tw.config.htmlUnsafeElements.indexOf(this.droppableTag) === -1) { - // tag = this.droppableTag; - // } // Create element and assign classes domNode = this.document.createElement(tag); this.domNode = domNode; diff --git a/core/modules/widgets/element.js b/core/modules/widgets/element.js index 4b46e52d0..0dd52eb30 100755 --- a/core/modules/widgets/element.js +++ b/core/modules/widgets/element.js @@ -32,9 +32,6 @@ ElementWidget.prototype.render = function(parent,nextSibling) { // Neuter blacklisted elements this.tag = this.parseTreeNode.tag; this.tag = $tw.utils.makeTagNameSafe(this.tag, "safe" + this.tag); - // if($tw.config.htmlUnsafeElements.indexOf(this.tag) !== -1) { - // this.tag = "safe-" + this.tag; - // } // Restrict tag name to digits, letts and dashes this.tag = this.tag.replace(/[^0-9a-zA-Z\-]/mg,""); // Default to a span diff --git a/core/modules/widgets/eventcatcher.js b/core/modules/widgets/eventcatcher.js index 6de3d9690..cad9121aa 100644 --- a/core/modules/widgets/eventcatcher.js +++ b/core/modules/widgets/eventcatcher.js @@ -36,9 +36,6 @@ EventWidget.prototype.render = function(parent,nextSibling) { // Create element var tag = this.parseTreeNode.isBlock ? "div" : "span"; tag = $tw.utils.makeTagNameSafe(this.elementTag,tag) - // if(this.elementTag && $tw.config.htmlUnsafeElements.indexOf(this.elementTag) === -1) { - // tag = this.elementTag; - // } var domNode = this.document.createElement(tag); this.domNode = domNode; // Assign classes diff --git a/core/modules/widgets/keyboard.js b/core/modules/widgets/keyboard.js index e6fd97694..0d39225cd 100644 --- a/core/modules/widgets/keyboard.js +++ b/core/modules/widgets/keyboard.js @@ -35,9 +35,6 @@ KeyboardWidget.prototype.render = function(parent,nextSibling) { this.execute(); var tag = this.parseTreeNode.isBlock ? "div" : "span"; tag = $tw.utils.makeTagNameSafe(this.tag,tag); - // if(this.tag && $tw.config.htmlUnsafeElements.indexOf(this.tag) === -1) { - // tag = this.tag; - // } // Create element var domNode = this.document.createElement(tag); // Assign classes diff --git a/core/modules/widgets/link.js b/core/modules/widgets/link.js index b6e0da156..506625409 100755 --- a/core/modules/widgets/link.js +++ b/core/modules/widgets/link.js @@ -62,9 +62,6 @@ LinkWidget.prototype.renderLink = function(parent,nextSibling) { // Sanitise the specified tag var tag = this.linkTag; tag = $tw.utils.makeTagNameSafe(tag,"a"); - // if($tw.config.htmlUnsafeElements.indexOf(tag) !== -1) { - // tag = "a"; - // } // Create our element var namespace = this.getVariable("namespace",{defaultValue: "http://www.w3.org/1999/xhtml"}), domNode = this.document.createElementNS(namespace,tag); diff --git a/core/modules/widgets/reveal.js b/core/modules/widgets/reveal.js index 3acc01841..2fdd9c134 100755 --- a/core/modules/widgets/reveal.js +++ b/core/modules/widgets/reveal.js @@ -34,9 +34,6 @@ RevealWidget.prototype.render = function(parent,nextSibling) { this.execute(); var tag = this.parseTreeNode.isBlock ? "div" : "span"; tag = $tw.utils.makeTagNameSafe(this.revealTag,tag); - // if(this.revealTag && $tw.config.htmlUnsafeElements.indexOf(this.revealTag) === -1) { - // tag = this.revealTag; - // } var domNode = this.document.createElement(tag); this.domNode = domNode; this.assignDomNodeClasses();