mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-04-04 20:54:29 +00:00
Allow tel: and fax: protocols. Wrangle the last hardcoded protocol enumeration so that it uses wp_allowed_protocols(). fixes #21081
git-svn-id: https://develop.svn.wordpress.org/trunk@21170 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -69,7 +69,8 @@ function edit_user( $user_id = 0 ) {
|
||||
$user->user_url = '';
|
||||
} else {
|
||||
$user->user_url = esc_url_raw( $_POST['url'] );
|
||||
$user->user_url = preg_match('/^(https?|ftps?|mailto|news|irc|gopher|nntp|feed|telnet):/is', $user->user_url) ? $user->user_url : 'http://'.$user->user_url;
|
||||
$protocols = implode( '|', array_map( 'preg_quote', wp_allowed_protocols() ) );
|
||||
$user->user_url = preg_match('/^(' . $protocols . '):/is', $user->user_url) ? $user->user_url : 'http://'.$user->user_url;
|
||||
}
|
||||
}
|
||||
if ( isset( $_POST['first_name'] ) )
|
||||
|
||||
Reference in New Issue
Block a user