#40680 closed enhancement (fixed)
Add support for `'tag' => true` in `wp_kses_attr()`
| Reported by: | ocean90 | Owned by: | ocean90 |
|---|---|---|---|
| Priority: | normal | Milestone: | 4.8 |
| Component: | Security | Version: | |
| Severity: | normal | Keywords: | has-patch has-unit-tests commit |
| Cc: | Focuses: |
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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
@dd32 Do you have any thoughts or objections?