fix(security): sanitize dynamic HTML rendering in Hero and ProductPage [FE-006]

This commit is contained in:
devops committed 2026-10-18 16:09:36 +00:00
1 parent 15524609fe
commit d3aa10c769
2 files changed
+4 -2

No files matched your search

+2 -1
View File
@@ -1,3 +1,4 @@
import { sanitizeBlogHtml } from "../lib/sanitizeBlogHtml";
import Image from "next/image";
import { motion, AnimatePresence, animate } from "motion/react";
import { ChevronLeft, ChevronRight, Globe, ShieldCheck, Calendar, ArrowLeft } from "lucide-react";
@@ -134,7 +135,7 @@ export default function Hero({ banners = [], onShopNavigate }: { banners?: Banne
suppressHydrationWarning
className="text-sm lg:text-xl text-medical-gray-600 mb-3 sm:mb-5 max-w-2xl mx-auto lg:mx-0 leading-relaxed font-vazir animate-fade-in [&_p]:text-sm [&_p]:lg:text-xl [&_p]:leading-relaxed [&_p]:my-0 [&_span]:text-inherit"
dangerouslySetInnerHTML={{
__html: subtitle
__html: sanitizeBlogHtml(subtitle)
}}
/>