-
Notifications
You must be signed in to change notification settings - Fork 13k
fix: character escaping in channel description notifications #35927
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: character escaping in channel description notifications #35927
Conversation
Signed-off-by: Abhinav Kumar <abhinav@avitechlab.com>
Signed-off-by: Abhinav Kumar <abhinav@avitechlab.com>
|
Looks like this PR is ready to merge! 🎉 |
🦋 Changeset detectedLatest commit: b6e04d5 The changes in this PR will be included in the next version bump. This PR includes changesets to release 36 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Code Review Completed! 🔥The code review was successfully completed based on your current configurations. Kody Guide: Usage and ConfigurationInteracting with Kody
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
apps/meteor/client/components/message/variants/SystemMessage.spec.tsx
Outdated
Show resolved
Hide resolved
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #35927 +/- ##
===========================================
- Coverage 64.78% 64.75% -0.03%
===========================================
Files 3099 3248 +149
Lines 92171 95485 +3314
Branches 17635 17871 +236
===========================================
+ Hits 59713 61833 +2120
- Misses 29688 30744 +1056
- Partials 2770 2908 +138
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
Signed-off-by: Abhinav Kumar <abhinav@avitechlab.com>
Kody Review CompleteGreat news! 🎉 Keep up the excellent work! 🚀 Kody Guide: Usage and ConfigurationInteracting with Kody
Current Kody ConfigurationReview OptionsThe following review options are enabled or disabled:
|
Proposed changes (including videos or screenshots)
Fixes an issue where special characters in system messages were incorrectly rendered due to unnecessary escaping logic. Updates the message rendering process to display characters as intended.
We can skip escaping since these data are directly rendered as react nodes which handles the escaping. Previously we used
dangerouslySetInnerHTMLwhich is no longer the case.Issue(s)
Steps to test or reproduce
Further comments
SUP-760
Description
This pull request addresses issues related to character escaping in channel description notifications within the Rocket.Chat application. The changes focus on removing unnecessary HTML escaping to prevent security vulnerabilities and ensure correct message rendering.
Key Changes
Patch Documentation:
Livechat Message Handling:
livechat_webrtc_video_callmessage type inapps/meteor/app/livechat/lib/messageTypes.tsto prevent potential security vulnerabilities.System Message Testing:
SystemMessagecomponent using React Testing Library inapps/meteor/client/components/message/variants/SystemMessage.spec.tsx. The tests ensure:Data Processing Adjustments:
apps/meteor/client/startup/messageTypes.ts. This change delegates the responsibility of handling potentially unsafe HTML content to the rendering layer.Omnichannel Services Update:
escapeHTMLin the handling oflivechat_webrtc_video_callmessages inee/packages/omnichannel-services/src/livechatSystemMessages.ts.These changes aim to improve the security and accuracy of message rendering in Rocket.Chat by addressing character escaping issues.