Skip to content

Commit b1ae705

Browse files
committed
[SanitizingFunctions|EscapingFunctions]Trait: add wp_kses_one_attr() to function lists
This function was introduced in WP 4.2.3. I've done a cursory look-over of the code, but I have not gone down the rabbit-hole of examining all functions involved (and yes, `wp_kses_one_attr()` calls a _lot_ of functions under the hood). Having said that, anastis did do a more detailed analysis and included their write-up of it in the ticket, so I'm satisfied that this function can be added to the list. Based on this write-up, I believe the function should be added to both the `$sanitizingFunctions` list as well as the `$escapingFunctions` list. Refs: * https://developer.wordpress.org/reference/functions/wp_kses_one_attr/ * WordPress/WordPress-Coding-Standards 1765#issuecomment-512192213 Fixes 1765
1 parent 73be58a commit b1ae705

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

WordPress/Helpers/EscapingFunctionsTrait.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ trait EscapingFunctionsTrait {
9292
'wp_json_encode' => true,
9393
'wp_kses_allowed_html' => true,
9494
'wp_kses_data' => true,
95+
'wp_kses_one_attr' => true,
9596
'wp_kses_post' => true,
9697
'wp_kses' => true,
9798
);

WordPress/Helpers/SanitizingFunctionsTrait.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,7 @@ trait SanitizingFunctionsTrait {
9696
'wp_handle_upload' => true,
9797
'wp_kses_allowed_html' => true,
9898
'wp_kses_data' => true,
99+
'wp_kses_one_attr' => true,
99100
'wp_kses_post' => true,
100101
'wp_kses' => true,
101102
'wp_parse_id_list' => true,

0 commit comments

Comments
 (0)