Opened 4 weeks ago
Last modified 4 weeks ago
#63156 new enhancement
Formatting: Expand sanitize_html_class() to support the full range of CDATA that a class attribute can contain
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | |
Component: | Formatting | Keywords: | has-patch has-unit-tests |
Focuses: | Cc: |
Description
The TODO comment in the sanitize_html_class()
function suggests expanding its support to include the full range of characters that a class attribute can contain. Currently, the function only allows alphanumeric characters, hyphens, and underscores.
However, updating the function to support a broader set of characters may break some existing tests.
Change History (1)
This ticket was mentioned in PR #8574 on WordPress/wordpress-develop by @debarghyabanerjee.
4 weeks ago
#1
- Keywords has-patch has-unit-tests added; needs-patch needs-unit-tests removed
Note: See
TracTickets for help on using
tickets.
Trac Ticket: Core-63156
### Summary
This update addresses the TODO in the sanitize_html_class function to expand its support to the full range of characters allowed in a class attribute. Currently, the function only permits alphanumeric characters, hyphens, and underscores. The change will allow a broader set of characters, aligning with the HTML specification for class attributes.