mirror of
https://github.com/TiddlyWiki/TiddlyWiki5.git
synced 2026-05-01 13:46:59 +00:00
This reverts commit 9a5f4cc0ef.
This commit is contained in:
@@ -26,10 +26,15 @@ Render this widget into the DOM
|
||||
ElementWidget.prototype.render = function(parent,nextSibling) {
|
||||
this.parentDomNode = parent;
|
||||
this.computeAttributes();
|
||||
// Eliminate blacklisted elements
|
||||
// Neuter blacklisted elements
|
||||
this.tag = this.parseTreeNode.tag;
|
||||
// Sanitize tag name if needed according to Custom Web-Componenets spec
|
||||
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
|
||||
this.tag = this.tag || "span";
|
||||
// Adjust headings by the current base level
|
||||
var headingLevel = ["h1","h2","h3","h4","h5","h6"].indexOf(this.tag);
|
||||
if(headingLevel !== -1) {
|
||||
|
||||
Reference in New Issue
Block a user