[wp-trac] [WordPress Trac] #64340: HTML API may double-escape class names when adding repeatedly
WordPress Trac
noreply at wordpress.org
Thu Dec 4 07:56:21 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 dev- | Focuses:
reviewed |
-------------------------------------------------+-------------------------
Changes (by jonsurrell):
* status: reopened => closed
* resolution: => fixed
Comment:
In [changeset:"61350" 61350]:
{{{
#!CommitTicketReference repository="" revision="61350"
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.
Reviewed by dmsnell, mamaduka.
Merges [61346] to the 6.9 branch.
Props jonsurrell, dmsnell.
Fixes #64340.
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/64340#comment:8>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list