Add support to allow FilterHtml to respect an existing "rel" attribute when option 'Add rel="nofollow" to all links' is enabled

Created on 21 March 2016, about 8 years ago
Updated 8 February 2023, over 1 year ago

Problem/Motivation

"rel" attribute is replaced when the text filter 'Add rel="nofollow" to all links' is checked.

Proposed resolution

Ideally, if "noreferrer" is set, it should be kept, and nofollow should be appended to it. (rel="noreferrer" "indicates that no referrer information is to be leaked when following the link)

The code in question is in \Drupal\filter\Plugin\Filter\FilterHtml::filterAttributes

User interface changes

None

API changes

None

Data model changes

None

✨ Feature request
Status

Active

Version

10.1 ✨

Component
TextΒ  β†’

Last updated 9 days ago

Created by

Pere Orga Catalonia

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡΅πŸ‡±Poland lamp5 Rzeszow

    I was looking for similar solution because for default, I want to have all links with nofollow except links with rel attribute inputed by our editors using for example Editor Advanced Links.

Production build 0.69.0 2024