mirror of
https://github.com/duckietm/Nitro-Cool-UI.git
synced 2025-06-21 22:36:58 +00:00
Added: sanitize check for Emoji
This commit is contained in:
parent
ae267e9430
commit
10b0591e0b
@ -15,7 +15,7 @@
|
|||||||
"@emoji-mart/react": "^1.1.1",
|
"@emoji-mart/react": "^1.1.1",
|
||||||
"@nitrots/nitro-renderer": "file:submodules/renderer",
|
"@nitrots/nitro-renderer": "file:submodules/renderer",
|
||||||
"@tanstack/react-virtual": "^3.0.0-beta.60",
|
"@tanstack/react-virtual": "^3.0.0-beta.60",
|
||||||
"dompurify": "^3.0.9",
|
"dompurify": "^3.0.11",
|
||||||
"emoji-mart": "^5.5.2",
|
"emoji-mart": "^5.5.2",
|
||||||
"emoji-toolkit": "8.0.0",
|
"emoji-toolkit": "8.0.0",
|
||||||
"react": "^18.2.0",
|
"react": "^18.2.0",
|
||||||
|
@ -79,7 +79,7 @@ export const ChatWidgetMessageView: FC<ChatWidgetMessageViewProps> = props => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div ref={elementRef} className={`bubble-container newbubblehe ${isVisible ? 'visible' : 'invisible'}`} onClick={event => GetRoomEngine().selectRoomObject(chat.roomId, chat.senderId, RoomObjectCategory.UNIT)}>
|
<div ref={elementRef} className={`bubble-container newbubblehe ${isVisible ? 'visible' : 'invisible'}`} onClick={event => GetRoomEngine().selectRoomObject(chat.roomId, chat.senderId, RoomObjectCategory.UNIT)}>
|
||||||
{selectedEmoji && <span>{selectedEmoji}</span>}
|
{selectedEmoji && <span>{DOMPurify.sanitize(selectedEmoji)}</span>}
|
||||||
{ (chat.styleId === 0) &&
|
{ (chat.styleId === 0) &&
|
||||||
<div className="user-container-bg" style={ { backgroundColor: chat.color } } /> }
|
<div className="user-container-bg" style={ { backgroundColor: chat.color } } /> }
|
||||||
<div className={ `chat-bubble bubble-${ chat.styleId } type-${ chat.type }` } style={ { maxWidth: getBubbleWidth } }>
|
<div className={ `chat-bubble bubble-${ chat.styleId } type-${ chat.type }` } style={ { maxWidth: getBubbleWidth } }>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user