#40680 closed enhancement (fixed)
Add support for `'tag' => true` in `wp_kses_attr()`
Reported by: | ocean90 | Owned by: | ocean90 |
---|---|---|---|
Milestone: | 4.8 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Security | Keywords: | has-patch has-unit-tests commit |
Focuses: | Cc: |
Description
Related: [meta5483], #20017
wp_kses_attr()
uses $allowed_html[strtolower($element)]) == 0
to check whether any attributes are allowed for an element. There's at least one place where true
is used to define the support of no attributes. But because count( true )
returns 1 unnecessary checks for the support of attributes are performed.
I don't see anything wrong with using true
as an alternative for an empty array and because it's already supported for attributes (#20017) I suggest to add official support for true
in wp_kses_attr()
as well.
Attachments (1)
Change History (5)
Note: See
TracTickets for help on using
tickets.
@dd32 Do you have any thoughts or objections?