This commit is contained in:
ADecametre
2025-01-27 19:23:28 -05:00
parent e795ec64d6
commit 809551d0f8
2 changed files with 3 additions and 1 deletions

View File

@ -64,7 +64,7 @@ export const ArtboardPage = () => {
<title>{name} | Reactive Resume</title> <title>{name} | Reactive Resume</title>
{metadata.css.visible && ( {metadata.css.visible && (
<style id="custom-css" lang="css"> <style id="custom-css" lang="css">
{sanitize(metadata.css.value)} {metadata.css.value}
</style> </style>
)} )}
</Helmet> </Helmet>

View File

@ -63,6 +63,8 @@ export const sanitize = (html: string, options?: sanitizeHtml.IOptions) => {
allowedAttributes: { allowedAttributes: {
...options?.allowedAttributes, ...options?.allowedAttributes,
"*": ["class", "style"], "*": ["class", "style"],
"a": ["href", "target"],
"img": ["src", "alt"],
}, },
allowedStyles: { allowedStyles: {
...options?.allowedStyles, ...options?.allowedStyles,