feat: add sanitized ref variable
All checks were successful
ci/woodpecker/push/build-and-publish Pipeline was successful
All checks were successful
ci/woodpecker/push/build-and-publish Pipeline was successful
This commit is contained in:
parent
2008033216
commit
c7e7f33240
1 changed files with 2 additions and 0 deletions
|
@ -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"] });
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue