feat: add sanitized ref variable
All checks were successful
ci/woodpecker/push/build-and-publish Pipeline was successful

This commit is contained in:
SauceyRed 2025-06-02 11:06:08 +02:00
parent 2008033216
commit c7e7f33240
Signed by: sauceyred
GPG key ID: 270B096EF6E9A462

View file

@ -73,6 +73,8 @@ if (props.format == "12") {
console.log("message:", props.text);
console.log("author:", props.username);
const sanitized = ref<string>();
onMounted(async () => {
const parsed = await parseInline(props.text, {gfm: true });
sanitized.value = DOMPurify.sanitize(parsed, { ALLOWED_TAGS: ["strong", "em", "br", "blockquote", "code", "ul", "ol", "li", "a"] });