summaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/wp-includes/meta.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/wp-includes/meta.php b/src/wp-includes/meta.php
index e1c1f92e48..fe144fcda6 100644
--- a/src/wp-includes/meta.php
+++ b/src/wp-includes/meta.php
@@ -1159,7 +1159,8 @@ function _get_meta_table( $type ) {
* @return bool Whether the meta key is considered protected.
*/
function is_protected_meta( $meta_key, $meta_type = '' ) {
- $protected = ( '_' === $meta_key[0] );
+ $sanitized_key = preg_replace( "/[^\x20-\x7E\p{L}]/", '', $meta_key );
+ $protected = strlen( $sanitized_key ) > 0 && ( '_' === $sanitized_key[0] );
/**
* Filters whether a meta key is considered protected.