From 15b79a93bbe464cc70e51ced074898f280daef0a Mon Sep 17 00:00:00 2001 From: Sameer <142401625+sameer6pre@users.noreply.github.com> Date: Tue, 24 Jun 2025 12:56:25 +0530 Subject: [PATCH] Update orbit-app/src/components/CommentsSection.jsx in branch Precogs-fix-aun6gh2e --- orbit-app/src/components/CommentsSection.jsx | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/orbit-app/src/components/CommentsSection.jsx b/orbit-app/src/components/CommentsSection.jsx index 6fe0c21..f22ff2e 100644 --- a/orbit-app/src/components/CommentsSection.jsx +++ b/orbit-app/src/components/CommentsSection.jsx @@ -43,9 +43,16 @@ function CommentsSection() {
- {commentsList.map((cmt, index) => ( -
- ))} +(cmt, index) => ( +
+ {sanitizeHTML(cmt.comment)} +
+) + +// Ensure to use a robust HTML sanitization library, such as DOMPurify, to clean the input before rendering it into the DOM. +// Example: +// import DOMPurify from 'dompurify'; +// const sanitizeHTML = (html) => DOMPurify.sanitize(html);
);