Closed (fixed)
Project:
Drupal core
Version:
11.x-dev
Component:
base system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
14 May 2023 at 03:53 UTC
Updated:
16 Oct 2023 at 08:24 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
jeffschulerComment #3
borisson_Can we add tests to prove the bug exists and that this fixes it?
Comment #4
jeffschuler@borisson_: I understand why you're requesting this but I don't believe it's a bug that deserves tests and it doesn't result in incorrect output. It's just a logical error that results in unnecessary over-processing.
This:
foreach (static::$uriAttributes as $attr) {loops over each of the attributes in this array:
protected static $uriAttributes = ['href', 'poster', 'src', 'cite', 'data', 'action', 'formaction', 'srcset', 'about'];For each of these attributes the current code is looking for all instances of that attribute, and then also looking for all instances of
srcset, and operating on the value of eachsrcsetit finds.So ... for every attribute ... we'll parse and operate on every
srcsetneedlessly. We should only parse for and operate on eachsrcsetonce.Comment #5
smustgrave commentedRefactor makes sense. This could probably be considered a task as it's an improvement over a bug. Will see what the committers think!
Comment #7
borisson_Looks like that is a random fail, back to rtbc per #6. I'm convinced by #4 that we don't need tests for this particular one.
Comment #9
smustgrave commentedThink another random failure
Comment #11
borisson_Another random fail
Comment #13
borisson_back to rtbc, another random fail.
Comment #14
lauriiiCommitted 98df2c9 and pushed to 11.x. Thanks!
Comment #16
wim leersOops! I introduced this bug ~7 years ago in #88183: Relative URLs in feeds should be converted to absolute ones 😇 Thanks, @jeffschuler!
Comment #17
jeffschuler@Wim Leers your amount of productive output deserves a few mistakes. At least it wasn't causing any problems!
Thanks all for seeing this through.