From cb5b46d7c97a52c4c5c3f137cbff8aeb288b3cdc Mon Sep 17 00:00:00 2001 From: Pas <74743263+Pasithea0@users.noreply.github.com> Date: Sun, 22 Feb 2026 22:11:14 -0700 Subject: [PATCH] dompurify notifications --- src/components/overlays/notificationsModal/utils/index.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/overlays/notificationsModal/utils/index.ts b/src/components/overlays/notificationsModal/utils/index.ts index 817c8ca5..7505f30f 100644 --- a/src/components/overlays/notificationsModal/utils/index.ts +++ b/src/components/overlays/notificationsModal/utils/index.ts @@ -1,3 +1,5 @@ +import DOMPurify from "dompurify"; + import { proxiedFetch } from "@/backend/helpers/fetch"; const DEFAULT_FEEDS = ["/notifications.xml"]; @@ -138,7 +140,7 @@ export const getCategoryLabel = (category: string) => { }; export function formatNotificationDescription(description: string): string { return ( - description + DOMPurify.sanitize(description) // First, normalize multiple consecutive line breaks to single line breaks .replace(/\n{3,}/g, "\n\n") // Handle bullet points before paragraph breaks