Opened 17 months ago
Last modified 17 months ago
#63156 new enhancement
Formatting: Expand sanitize_html_class() to support the full range of CDATA that a class attribute can contain
| Reported by: | debarghyabanerjee | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Awaiting Review |
| Component: | Formatting | Version: | |
| Severity: | normal | Keywords: | has-patch has-unit-tests |
| Cc: | Focuses: |
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.
17 months ago
#1
- Keywords has-patch has-unit-tests added; needs-patch needs-unit-tests removed
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
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.