diff --git a/src/utils/text.ts b/src/utils/text.ts index d495c28..ddd4566 100644 --- a/src/utils/text.ts +++ b/src/utils/text.ts @@ -16,12 +16,12 @@ export function pluralize(value: number, word: string, plural?: string) { export function sanitizeHTML(html: string): string { return DOMPurify.sanitize(html, { ALLOWED_TAGS: [ - 'a', 'b', 'blockquote', 'br', 'code', 'dd', 'del', 'div', 'dl', 'dt', 'em', 'font', - 'h1', 'h2', 'h3', 'h4', 'h5', 'h6', 'hr', 'i', 'li', 'ol', 'p', 'q', 'pre', 's', 'span', 'strong', - 'sub', 'sup', 'u', 'wbr', '#text' + 'a', 'b', 'bdi', 'blockquote', 'br', 'cite', 'code', 'dd', 'del', 'div', 'dl', 'dt', 'em', + 'h1', 'h2', 'h3', 'h4', 'h5', 'hr', 'i', 'li', 'ol', 'p', 'pre', 'q', 'rp', 'rt', 'ruby', + 's', 'small', 'span', 'strong', 'sub', 'sup', 'u', 'ul', 'wbr' ], ALLOWED_ATTR: [ - 'align', 'alt', 'class', 'clear', 'color', 'dir', 'href', 'lang', 'rel', 'title', 'translate' + 'align', 'class', 'dir', 'href', 'lang', 'title', 'translate' ] }); }