Skip to content

Filter protocol-relative URLs in ExternalLinkFilter. Fixes issue #22742.

What does this MR do?

This MR contains changes so that protocol-relative links (e.g. //example.com rather than http://example.com or https://example.com) will be filtered by ExternalLinkFilter and appended with "rel" attribute with values "nofollow noreferrer".

Are there points in the code the reviewer needs to double check?

The regular expression used to filter protocol-relative link and sufficient tests were written.

Why was this MR needed?

To fix #22742 (closed)

Screenshots (if relevant)

N/A

Does this MR meet the acceptance criteria?

What are the relevant issue numbers?

#22742 (closed)

Closes #22742 (closed)

Merge request reports