Problem/Motivation

If a link already has a rel value such as noopener or noreferrer then there will be a duplication of the value. In results the rel value can be rel="noreferrer noreferrer" which is not valid imo.

Or in case when the code triggers two times for the same link it duplicates the already existing rel value.

Issue fork noreferrer-3192485

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

nginex created an issue. See original summary.

nginex’s picture

Assigned: nginex » Unassigned
Status: Active » Needs review

See the MR with the provided fix

mfb’s picture

I agree it's invalid - the keywords should be unique - could you also add a test?

nginex’s picture

Issue tags: +Needs tests
mfb’s picture

Issue tags: -Needs tests

Rebased and added a test :)

  • mfb committed afa5223 on 8.x-1.x authored by nginex
    Issue #3192485 by nginex, mfb: The rel value such as noreferrer can be...
mfb’s picture

Status: Needs review » Fixed

  • mfb committed 3d8aa6a on 8.x-1.x
    Issue #3192485 by mfb: Followup to fix test failure on PHP 7.0
    

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.