Skip to content

Commit 5433109

Browse files
Copilotsensslen
andcommitted
Remove potentially unsafe attributes from DOMPurify config
Co-authored-by: sensslen <3428860+sensslen@users.noreply.github.com>
1 parent a39a405 commit 5433109

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/components/MessageItem.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ const MessageItem: React.FC<MessageItemProps> = ({ message, onShowMessage, onHid
3535
// This allows XML/HTML tags in the message template while protecting against XSS
3636
const sanitizedMessage = DOMPurify.sanitize(message, {
3737
ALLOWED_TAGS: ['b', 'i', 'em', 'strong', 'u', 'br', 'p', 'span', 'a'],
38-
ALLOWED_ATTR: ['href', 'target', 'class', 'style']
38+
ALLOWED_ATTR: ['href', 'class']
3939
});
4040

4141
return sanitizedMessage;

0 commit comments

Comments
 (0)