Refactor Code to typescript

This commit is contained in:
Benjamin Toby
2025-01-10 20:10:28 +01:00
parent 549d0abc02
commit eb0992f28d
270 changed files with 3535 additions and 9062 deletions
@@ -1,6 +0,0 @@
export let allowedTags: string[];
export let allowedAttributes: {
a: string[];
img: string[];
"*": string[];
};
@@ -1,12 +0,0 @@
// @ts-check
const sanitizeHtmlOptions = {
allowedTags: ["b", "i", "em", "strong", "a", "p", "span", "ul", "ol", "li", "h1", "h2", "h3", "h4", "h5", "h6", "img", "div", "button", "pre", "code", "br"],
allowedAttributes: {
a: ["href"],
img: ["src", "alt", "width", "height", "class", "style"],
"*": ["style", "class"],
},
};
module.exports = sanitizeHtmlOptions;
@@ -0,0 +1,35 @@
// @ts-check
const sanitizeHtmlOptions = {
allowedTags: [
"b",
"i",
"em",
"strong",
"a",
"p",
"span",
"ul",
"ol",
"li",
"h1",
"h2",
"h3",
"h4",
"h5",
"h6",
"img",
"div",
"button",
"pre",
"code",
"br",
],
allowedAttributes: {
a: ["href"],
img: ["src", "alt", "width", "height", "class", "style"],
"*": ["style", "class"],
},
};
export default sanitizeHtmlOptions;