support html img in wpt desc

This commit is contained in:
vcoppe
2024-08-14 18:19:28 +02:00
parent f36194b336
commit 9327870d54

View File

@@ -24,13 +24,13 @@
if (text === undefined) {
return '';
}
let sanitized = sanitizeHtml(text, {
allowedTags: ['a', 'br'],
return sanitizeHtml(text, {
allowedTags: ['a', 'br', 'img'],
allowedAttributes: {
a: ['href', 'target']
a: ['href', 'target'],
img: ['src']
}
}).trim();
return sanitized;
}
</script>
@@ -102,4 +102,9 @@
@apply text-blue-500 dark:text-blue-300;
@apply hover:underline;
}
div :global(img) {
@apply my-0;
@apply rounded-md;
}
</style>