1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-04-26 04:33:10 +00:00

remove tag-sanitation from element.js

This commit is contained in:
pmario 2024-06-09 10:42:56 +02:00
parent 8345445b50
commit 68ba4d5bb1

View File

@ -33,7 +33,9 @@ ElementWidget.prototype.render = function(parent,nextSibling) {
this.tag = this.parseTreeNode.tag;
this.tag = $tw.utils.makeTagNameSafe(this.tag, "safe" + this.tag);
// Restrict tag name to digits, letts and dashes
this.tag = this.tag.replace(/[^0-9a-zA-Z\-]/mg,"");
// 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