Skip to content
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] Announcement banner link opening in the same page #27554

Merged
merged 4 commits into from
Dec 19, 2022

Conversation

hugocostadev
Copy link
Contributor

@hugocostadev hugocostadev commented Dec 15, 2022

Proposed changes (including videos or screenshots)

Channel Announcements that contain links are opening on the same page instead of a new page/tab causing render issues, especially on the desktop client.

The fix was simple to add a hook for the dompurify library to add the target and rel attributes to keep the _blank behavior.

Also, it introduced some parsers settings to inlineWithoutBreaks variant to avoid breaking messages at Announcements and other places that uses this variant.

Issue(s)

closes #27496
closes #27563
closes #27473
closes RocketChat/Rocket.Chat.Electron#2560

Steps to test or reproduce

Further comments

This bug was introduced by this PR: #27245

TC-335

@hugocostadev hugocostadev requested a review from a team as a code owner December 15, 2022 17:04
@codecov
Copy link

codecov bot commented Dec 16, 2022

Codecov Report

Merging #27554 (b8ab31a) into develop (f7908e8) will increase coverage by 0.95%.
The diff coverage is 47.61%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop   #27554      +/-   ##
===========================================
+ Coverage    41.12%   42.07%   +0.95%     
===========================================
  Files          840      818      -22     
  Lines        18365    17772     -593     
  Branches      2106     2003     -103     
===========================================
- Hits          7553     7478      -75     
+ Misses       10524    10023     -501     
+ Partials       288      271      -17     
Flag Coverage Δ
e2e 42.07% <47.61%> (+0.95%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

@dionisio-bot dionisio-bot bot added the stat: ready to merge PR tested and approved waiting for merge label Dec 19, 2022
@kodiakhq kodiakhq bot merged commit 27bd0f1 into develop Dec 19, 2022
@kodiakhq kodiakhq bot deleted the fix/announcement-parser branch December 19, 2022 19:23
gabriellsh added a commit that referenced this pull request Dec 20, 2022
…/attachment-file

* 'develop' of github.com:RocketChat/Rocket.Chat: (33 commits)
  Chore: fix EmailInbox intermittent e2e tests (#27573)
  [IMPROVE] Authorize search of custom fields on `users.list` (#27423)
  Chore:  Threads as React components (#27524)
  [NEW] Upload service (#27543)
  [FIX] Fix emoji appearance on sidebar (#27580)
  [FIX] RoomLeader status not working (#27576)
  [FIX] Announcement banner link opening in the same page (#27554)
  Bump version to 5.4.1
  [FIX] Custom languages not being applied to i18next (#27557)
  [FIX] Registration and Login placeholders not being used (#27558)
  [FIX] Fix Login with Show default form disabled (#27475)
  [FIX] Message Actions menu does not close upon choosing an action (#27328)
  Chore: Deprecate unused omnichannel API (#27538)
  [FIX] Pagination not working on current chats (#27432)
  [FIX] Custom languages not being applied to i18next (#27557)
  [FIX] Registration and Login placeholders not being used (#27558)
  [FIX] Message Actions menu does not close upon choosing an action (#27328)
  Chore: Deprecate unused omnichannel API (#27538)
  Regression: Add button-icon-disabled-color to the palette (#27522)
  Chore: Refactor CreateChannelModal (#27469)
  ...
@sampaiodiego sampaiodiego mentioned this pull request Feb 17, 2023
@sampaiodiego sampaiodiego mentioned this pull request Mar 9, 2023
13 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment