1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-12-08 17:58:05 +00:00

Add a hidden setting to control HTML sandboxing

This commit is contained in:
jeremy@jermolene.com
2021-04-11 10:10:16 +01:00
parent eced60853f
commit 89546b3357
2 changed files with 17 additions and 2 deletions

View File

@@ -23,10 +23,12 @@ var HtmlParser = function(type,text,options) {
type: "element",
tag: "iframe",
attributes: {
src: {type: "string", value: src},
sandbox: {type: "string", value: ""}
src: {type: "string", value: src}
}
}];
if($tw.wiki.getTiddlerText("$:/config/HtmlParser/DisableSandbox","no") !== "yes") {
this.tree[0].attributes.sandbox = {type: "string", value: $tw.wiki.getTiddlerText("$:/config/HtmlParser/SandboxTokens","")};
}
};
exports["text/html"] = HtmlParser;