Skip to content

Commit

Permalink
fix: special characters not escaped on sidepanel extended view (Rocke…
Browse files Browse the repository at this point in the history
  • Loading branch information
juliajforesti authored Dec 13, 2024
1 parent eb794b7 commit 75643e1
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/tidy-boxes-hide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@rocket.chat/meteor': patch
---

Fixes special characters not being escaped on sidepanel extended view
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export const useItemData = (
time,
badges,
avatar: AvatarTemplate && <AvatarTemplate {...room} />,
subtitle: message,
subtitle: message ? <span className='message-body--unstyled' dangerouslySetInnerHTML={{ __html: message }} /> : null,
}),
[AvatarTemplate, badges, highlighted, icon, message, openedRoom, room, time],
);
Expand Down
3 changes: 1 addition & 2 deletions apps/meteor/tests/e2e/feature-preview.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,7 @@ test.describe.serial('feature preview', () => {
await expect(poHomeChannel.sidepanel.getExtendedItem(sidepanelTeam, message)).toBeVisible();
});

// remove .fail after fix
test.fail('should escape special characters on item subtitle', async ({ page }) => {
test('should escape special characters on item subtitle', async ({ page }) => {
await page.goto('/home');
const message = 'hello > world';
const parsedWrong = 'hello &gt; world';
Expand Down

0 comments on commit 75643e1

Please sign in to comment.