Logic error in Html::transformRootRelativeUrlsToAbsolute()

Created on 14 May 2023, over 1 year ago
Updated 2 October 2023, 12 months ago

Problem/Motivation

Logic error: In Drupal\Component\Utility\Html, the transformRootRelativeUrlsToAbsolute() function tries to operate on any srcset attributes in its input every time it checks for every other attribute.

Proposed resolution

Move foreach ($xpath->query("//*[@srcset]") outside the foreach (static::$uriAttributes as $attr) loop.

🐛 Bug report
Status

Fixed

Version

11.0 🔥

Component
Base 

Last updated 33 minutes ago

Created by

🇺🇸United States jeffschuler Boulder, Colorado

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

Comments & Activities

Production build 0.71.5 2024