Skip to content

Sanitize slack-formatted links in chat messages

Carla Drago requested to merge 387837-slack-links into master

What does this MR do and why?

This sanitizes text matching the link format for a slack message from issue descriptions.

The slack link format is <http://custom-url.com|CLICK HERE>

The change here uses a regex to match relevant strings then escape the < and > characters with &lt; and &gt; respectively.

This renders the text as written and doesn't convert it to a link.

Changelog: other

Screenshots or screen recordings

Before

Screenshot_2023-07-17_at_20.17.10

After

Screenshot_2023-07-18_at_14.07.16

How to set up and validate locally

This is complicated to do as it requires starting a gitpod instance and connecting it to our Slack (Dev) instance.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #387837 (closed)

Edited by Carla Drago

Merge request reports