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);
);