Skip to content

Commit 0aa6cf7

Browse files
authored
Merge pull request #2397 from Chouby/sanitize_locale_name
Add sanitize_locale_name() to escaping functions and unslashing sanitizing functions
2 parents 44f3abb + 2b961ed commit 0aa6cf7

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

WordPress/Helpers/EscapingFunctionsTrait.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ trait EscapingFunctionsTrait {
8484
'sanitize_hex_color_no_hash' => true,
8585
'sanitize_html_class' => true,
8686
'sanitize_key' => true,
87+
'sanitize_locale_name' => true,
8788
'sanitize_user_field' => true,
8889
'tag_escape' => true,
8990
'urlencode_deep' => true,

WordPress/Helpers/SanitizationHelperTrait.php

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -137,14 +137,15 @@ trait SanitizationHelperTrait {
137137
* @var array<string, bool>
138138
*/
139139
private $unslashingSanitizingFunctions = array(
140-
'absint' => true,
141-
'boolval' => true,
142-
'count' => true,
143-
'doubleval' => true,
144-
'floatval' => true,
145-
'intval' => true,
146-
'sanitize_key' => true,
147-
'sizeof' => true,
140+
'absint' => true,
141+
'boolval' => true,
142+
'count' => true,
143+
'doubleval' => true,
144+
'floatval' => true,
145+
'intval' => true,
146+
'sanitize_key' => true,
147+
'sanitize_locale_name' => true,
148+
'sizeof' => true,
148149
);
149150

150151
/**

0 commit comments

Comments
 (0)