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, almost 9 years ago
Updated 8 February 2023, almost 2 years 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 17 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.71.5 2024