Commit aa51e50
committed
KSES: Early-abort in wp_kses_hair() when no attributes exist.
When `wp_kses_hair()` calls into the HTML API to parse an attribute string, it checks if the result might be `null` and returns early, skipping a few minor operations. It could also skip when the returned attribute count is zero.
This patch adds the additional check and early-return.
Developed in: WordPress#10764
Discussed in: https://core.trac.wordpress.org/ticket/63724
Follow-up to [61499].
Props dd32, dmsnell, jonsurrell.
See #63724.
git-svn-id: https://develop.svn.wordpress.org/trunk@61503 602fd350-edb4-49c9-b593-d223f7449a821 parent 73d7a6d commit aa51e50
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1624 | 1624 | | |
1625 | 1625 | | |
1626 | 1626 | | |
1627 | | - | |
| 1627 | + | |
1628 | 1628 | | |
1629 | 1629 | | |
1630 | 1630 | | |
| |||
0 commit comments