mirror of
https://github.com/TiddlyWiki/TiddlyWiki5.git
synced 2026-05-05 20:08:49 +00:00
Fix 8166 html tag validation (#8176)
* wip proposal still contains commented old code - tests are missing * rename isTagNameSafe to makeTagNameSafe * remove comments * remove redundant space * add htmlCustomPrimitives to the $tw.config object * remove tag-sanitation from element.js * WIP - add html-element sanitation to the new makeTagNameSafe function, so it can be used globally * simplify sanitation logic and fix inline docs * Move top comment into inline comments
This commit is contained in:
@@ -35,9 +35,7 @@ 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;
|
||||
// Assign classes
|
||||
|
||||
Reference in New Issue
Block a user