Skip to content

Commit

Permalink
Allow to provide custom colors for the card text
Browse files Browse the repository at this point in the history
  • Loading branch information
kubk committed Jan 11, 2024
1 parent fd24f46 commit a6cdf8c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/lib/sanitize-html/sanitize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
},
});
};

0 comments on commit a6cdf8c

Please sign in to comment.