mirror of
https://seed.radicle.dev/rad:z4V1sjrXqjvFdnCUbxPFqd5p4DtH5.git
synced 2026-11-21 06:10:44 +08:00
Scope DOMPurify config to call sites
Replace global setConfig with an exported sanitizeConfig passed inline. The global config leaked into mermaid's internal strict-mode sanitization, stripping valid SVG diagrams.
This commit is contained in:
@@ -18,7 +18,7 @@
|
||||
canonicalize,
|
||||
isCommit,
|
||||
} from "@app/lib/utils";
|
||||
import { Renderer, markdown } from "@app/lib/markdown";
|
||||
import { Renderer, markdown, sanitizeConfig } from "@app/lib/markdown";
|
||||
|
||||
export let content: string;
|
||||
export let path: string = "/";
|
||||
@@ -97,7 +97,8 @@
|
||||
renderer: new Renderer($activeUnloadedRouteStore),
|
||||
breaks,
|
||||
}) as string,
|
||||
);
|
||||
sanitizeConfig,
|
||||
) as string;
|
||||
}
|
||||
|
||||
afterUpdate(async () => {
|
||||
|
||||
Reference in New Issue
Block a user