From a6cdf8ce28066921247b0d1b59a917dcb0cef882 Mon Sep 17 00:00:00 2001 From: Gorbachev Egor <7gorbachevm@gmail.com> Date: Thu, 11 Jan 2024 14:07:52 +0700 Subject: [PATCH] Allow to provide custom colors for the card text --- src/lib/sanitize-html/sanitize.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib/sanitize-html/sanitize.ts b/src/lib/sanitize-html/sanitize.ts index df2973df..8fc1cc89 100644 --- a/src/lib/sanitize-html/sanitize.ts +++ b/src/lib/sanitize-html/sanitize.ts @@ -2,9 +2,10 @@ import sanitizeHtml from "sanitize-html"; export const sanitize = (text: string) => { return sanitizeHtml(text, { - allowedTags: ["small", "a", "big", "br", "b"], + allowedTags: ["small", "a", "big", "br", "b", "font"], allowedAttributes: { a: ["href"], + font: ["color"], }, }); };