datasquirel/package-shared/functions/backend/html/sanitizeHtmlOptions.ts
Benjamin Toby a90989cea7 Updates
2025-05-12 10:49:30 +01:00

34 lines
646 B
TypeScript

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", "title", "class", "style", "target"],
img: ["src", "alt", "width", "height", "class", "style"],
"*": ["style", "class", "title"],
},
};
export default sanitizeHtmlOptions;