Skip to content

Commit a691d36

Browse files
committed
Sanitize comment text before displaying to enhance security
1 parent a0a6fc7 commit a691d36

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/Comment/MonoComment.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ const MonoComment = ({ comment, fetchComments }) => {
114114
<img src={`data:image/jpeg;base64,${dataInfor?.avatar}`} alt='Avatar' className="w-[30px] h-[30px] rounded-[50%]" />
115115
<div className="mx-2 mr-5">
116116
<p className="font-bold">{comment.userName}</p>
117-
<p>{comment.text}</p>
117+
<p>{comment.sanitizedText}</p>
118118

119119
<div className="flex gap-3 items-center">
120120
<div className="flex items-center cursor-pointer" onClick={handleAction}>

0 commit comments

Comments
 (0)