[wp-trac] [WordPress Trac] #55407: Allow case-insensitive elements for KSES
WordPress Trac
noreply at wordpress.org
Wed Mar 16 22:53:21 UTC 2022
#55407: Allow case-insensitive elements for KSES
--------------------------+-----------------------------
Reporter: r-a-y | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Formatting | Version:
Severity: normal | Keywords: has-patch
Focuses: |
--------------------------+-----------------------------
I'm trying to allow some HTML elements that are capitalized.
eg. `<Post attribute="value"></Post>`
However, attempting to add a custom element with the
`'wp_kses_allowed_html'` filter fails due to the `strtolower()` additions
in `kses.php`. I've attached a patch, which removes these `strtolower()`
calls. Let me know what you think.
HTML elements do not have to be lowercase. The W3C notes this here:
https://w3c.github.io/html-reference/documents.html#case-insensitivity
--
Ticket URL: <https://core.trac.wordpress.org/ticket/55407>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list