Skip to content

Fix highlights in messages (or search results) breaking links #30264

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

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

bojidar-bg
Copy link

@bojidar-bg bojidar-bg commented Jul 6, 2025

Fixes #17011 and #29807, by running the linkifier that turns text into links before the highlighter that adds highlights to text - that way, the highlighter cannot break a link by inserting extraneous tags.

BTW, this PR was made as part of a live stream! (: You can see the final demonstration of the bug having been fixed (and subsequently reproduced on develop) near the very end, at 4:12:10. (:

Checklist

  • Tests written for new code (and old code if feasible).
  • New or updated public/exported symbols have accurate TSDoc documentation.
  • Linter and other CI checks pass.
  • I have licensed the changes to Element by completing the Contributor License Agreement (CLA)

Fixes element-hq#17011 and fixes element-hq#29807, by running the linkifier that turns text into links before the highlighter that adds highlights to text.
@bojidar-bg bojidar-bg requested review from a team as code owners July 6, 2025 14:45
@bojidar-bg bojidar-bg requested review from dbkr and MidhunSureshR July 6, 2025 14:45
@github-actions github-actions bot added the Z-Community-PR Issue is solved by a community member's PR label Jul 6, 2025
@dbkr dbkr added the T-Defect label Jul 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
T-Defect Z-Community-PR Issue is solved by a community member's PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Search highlighting breaks links
2 participants