Closed (fixed)
Project:
Drupal core
Version:
11.x-dev
Component:
render system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
3 Jul 2026 at 20:56 UTC
Updated:
4 Aug 2026 at 07:15 UTC
Jump to comment: Most recent
Comments
Comment #3
prudloff commentedComment #4
ghost of drupal pastthis is superfluous because unlike the issue i reported in you do know the type of the needle and the haystack both:
$attribute_name = strtolower($match[1]);
$skip = (
in_array($attribute_name, ['style', 'srcdoc']
the needle is a string since it comes from strtolower and the haystack is a list of fixed non empty strings so there's no need to strict match them. In the other issue I raised a red flag because heaven knows what's in allowed_attributes
of course it doesn't hurt but it's not necessary either
Comment #5
smustgrave commented@prudloff thoughts for arguing for?
Comment #6
prudloff commentedI don't have a strong opinion about this.
ghost of drupal past is probably right and I might have been a bit too quick to create this issue.
That said, I think we should have a CI rule that forces using strict mode everywhere (this is proposed in #3295295: [META] Always call in_array() in strict mode).
So we could either:
Comment #7
smustgrave commentedMR is already up lets see what committers say
Comment #11
catchYeah while this might not fix anything it will be one less thing to review when we introduce the rule and has no downside.
Committed/pushed to main and 11.x, thanks!