[wp-trac] [WordPress Trac] #58146: HTML API: Ensure attribute updates happen only once for case variants
WordPress Trac
noreply at wordpress.org
Wed Apr 19 09:25:49 UTC 2023
#58146: HTML API: Ensure attribute updates happen only once for case variants
--------------------------------------+------------------------------
Reporter: dmsnell | Owner: Bernhard Reiter
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 6.2.1
Component: HTML API | Version: 6.2
Severity: normal | Resolution: fixed
Keywords: has-patch has-unit-tests | Focuses:
--------------------------------------+------------------------------
Changes (by Bernhard Reiter):
* owner: (none) => Bernhard Reiter
* status: new => closed
* resolution: => fixed
Comment:
In [changeset:"55659" 55659]:
{{{
#!CommitTicketReference repository="" revision="55659"
HTML API: Ensure attribute updates happen only once for case variants.
When setting a new value for an attribute multiple times and providing
multiple case variations of the attribute name the Tag Processor has
been appending multiple copies of the attribute into the updated HTML.
This means that only the first attribute set determines the value in
the final output, plus the output will //appear// wrong.
In this patch we're adding a test to catch the situation and resolving it
by using the appropriate comparable attribute name as a key for storing
the updates as we go. Previously we stored updates to the attribute by
its given `$name`, but when a new update of the same name with a
case variant was queued, it would not override the previously-enqueued
value as it out to have.
Props dmsnell, zieladam.
Fixes #58146.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/58146#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list