[wp-trac] [WordPress Trac] #63786: KSES: Add new allowed HTML tags
WordPress Trac
noreply at wordpress.org
Wed Aug 6 18:56:42 UTC 2025
#63786: KSES: Add new allowed HTML tags
-------------------------+---------------------
Reporter: ramiy | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: 6.9
Component: General | Version:
Severity: normal | Resolution:
Keywords: has-patch | Focuses:
-------------------------+---------------------
Comment (by ramiy):
Replying to [comment:6 westonruter]:
> @ramiy I'm curious how you came across this specific set of tags to add.
Were they specific ones that you found were needed?
It was part of Elementor security check. When using `wp_kses_post()` some
semantic tags removed. So, instead of creating a dedicated solution for
our needs, we decided to update the `wp_kses_post()` method. But when
examining this method, I noticed that the allowed HTML tags is not
complete and I decided to add the additional HTML tags.
> There are other fundamental tags which aren't allowed yet either, like
`option` or `optgroup` or `select`, as you can see not even `form` is
allowed, intentionally: https://github.com/WordPress/wordpress-
develop/blob/c4186c044f3dd6599f479dcfc5d84ad24bcebea5/src/wp-
includes/kses.php#L900
>
> So it doesn't seem to make sense to add `datalist`.
No problem, I will update the PR.
> A tag that is currently missing which would seem to make sense is `wbr`.
I'll add this tag to the PR.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/63786#comment:9>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list