[wp-trac] [WordPress Trac] #64340: HTML API may double-escape class names when adding repeatedly
WordPress Trac
noreply at wordpress.org
Wed Dec 3 17:25:50 UTC 2025
#64340: HTML API may double-escape class names when adding repeatedly
--------------------------------------+-------------------------
Reporter: jonsurrell | Owner: jonsurrell
Type: defect (bug) | Status: closed
Priority: normal | Milestone: 6.9.1
Component: HTML API | Version: 6.9
Severity: normal | Resolution: fixed
Keywords: has-patch has-unit-tests | Focuses:
--------------------------------------+-------------------------
Changes (by jonsurrell):
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"61346" 61346]:
{{{
#!CommitTicketReference repository="" revision="61346"
HTML API: Ensure correct encoding of modified class names.
Some class names with HTML character references could be mishandled, for
example:
- Failure to remove an existing class like `&` with `::remove_class( '&'
)`
- Double-encoding of an existing class like `&` after a modification,
becoming `&`
The second case manifested after double-encoding prevention was removed
from `::set_attribute()` in [60919].
Developed in https://github.com/WordPress/wordpress-develop/pull/10591.
Props jonsurrell, dmsnell.
Fixes #64340.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/64340#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list