sanitize_user() fixes.
git-svn-id: https://develop.svn.wordpress.org/trunk@3454 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
2083c8d0b9
commit
d1e7e7e9b7
|
@ -266,7 +266,12 @@ function remove_accents($string) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function sanitize_user( $username ) {
|
function sanitize_user( $username ) {
|
||||||
return preg_replace('|a-z0-9 _.-|i', '', $username);
|
$raw_username = $username;
|
||||||
|
$username = strip_tags($username);
|
||||||
|
// Kill octets
|
||||||
|
$username = preg_replace('|%([a-fA-F0-9][a-fA-F0-9])|', '', $username);
|
||||||
|
$username = preg_replace('/&.+?;/', '', $username); // Kill entities
|
||||||
|
return apply_filters('sanitize_user', $username, $raw_username);
|
||||||
}
|
}
|
||||||
|
|
||||||
function sanitize_title($title, $fallback_title = '') {
|
function sanitize_title($title, $fallback_title = '') {
|
||||||
|
|
Loading…
Reference in New Issue