W3C - Duplicate attribute defer

Created on 5 June 2023, about 1 year ago

Problem/Motivation

When Deferred JavaScript Execution: Add The defer Tag To All Script Tags is enabled and a library is defining a defer attribute for its js , e.g https://git.drupalcode.org/project/fontawesome/-/blob/8.x-2.x/fontawesom..., a second defer attribute is being added to the src tag.

This is making w3c validation to report a Duplicate attribute defer error.

Proposed resolution

Adjust pattern to not take into account those src tags that already have the defer attribute.

Regex testing: https://regex101.com/r/WrcrzQ/1

πŸ› Bug report
Status

Needs review

Version

6.0

Component

Modifier

Created by

πŸ‡ͺπŸ‡ΈSpain SadySierralta

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

Comments & Activities

Production build 0.69.0 2024