mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
Simplify sanitize_key() and use it in more places. see #14910
git-svn-id: https://develop.svn.wordpress.org/trunk@15635 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -763,10 +763,6 @@ function sanitize_user( $username, $strict = false ) {
|
||||
*/
|
||||
function sanitize_key( $key ) {
|
||||
$raw_key = $key;
|
||||
$key = wp_strip_all_tags($key);
|
||||
// Kill octets
|
||||
$key = preg_replace('|%([a-fA-F0-9][a-fA-F0-9])|', '', $key);
|
||||
$key = preg_replace('/&.+?;/', '', $key); // Kill entities
|
||||
|
||||
$key = preg_replace('|[^a-z0-9 _.\-@]|i', '', $key);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user