From 1a09fcc6ba800448f93e481dcce3c8b6196dcf74 Mon Sep 17 00:00:00 2001 From: ryan Date: Wed, 13 May 2009 22:41:05 +0000 Subject: [PATCH] Don't set user's url to http://. Props josephscott. fixes #9804 git-svn-id: http://svn.automattic.com/wordpress/trunk@11320 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/user.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/wp-admin/includes/user.php b/wp-admin/includes/user.php index d39c254729..4020bd4bae 100644 --- a/wp-admin/includes/user.php +++ b/wp-admin/includes/user.php @@ -88,8 +88,12 @@ function edit_user( $user_id = 0 ) { if ( isset( $_POST['email'] )) $user->user_email = wp_specialchars( trim( $_POST['email'] )); if ( isset( $_POST['url'] ) ) { - $user->user_url = clean_url( trim( $_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; + if ( empty ( $_POST['url'] ) || $_POST['url'] == 'http://' ) { + $user->user_url = ''; + } else { + $user->user_url = clean_url( trim( $_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; + } } if ( isset( $_POST['first_name'] )) $user->first_name = wp_specialchars( trim( $_POST['first_name'] )); @@ -830,4 +834,4 @@ function default_password_nag() { echo '

'; } -?> \ No newline at end of file +?>