Merge pull request #2186 from ADecametre/main

Fix broken hyperlinks, images and custom CSS (#2182)
This commit is contained in:
Amruth Pillai
2025-01-30 08:18:47 +01:00
committed by GitHub
2 changed files with 3 additions and 2 deletions
+1 -2
View File
@@ -1,4 +1,3 @@
import { sanitize } from "@reactive-resume/utils";
import { useEffect, useMemo } from "react";
import { Helmet } from "react-helmet-async";
import { Outlet } from "react-router";
@@ -64,7 +63,7 @@ export const ArtboardPage = () => {
<title>{name} | Reactive Resume</title>
{metadata.css.visible && (
<style id="custom-css" lang="css">
{sanitize(metadata.css.value)}
{metadata.css.value}
</style>
)}
</Helmet>
+2
View File
@@ -63,6 +63,8 @@ export const sanitize = (html: string, options?: sanitizeHtml.IOptions) => {
allowedAttributes: {
...options?.allowedAttributes,
"*": ["class", "style"],
"a": ["href", "target"],
"img": ["src", "alt"],
},
allowedStyles: {
...options?.allowedStyles,