WordPress.org

Make WordPress Core

Changeset 11320


Ignore:
Timestamp:
05/13/09 22:41:05 (5 years ago)
Author:
ryan
Message:

Don't set user's url to http://. Props josephscott. fixes #9804

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/user.php

    r11319 r11320  
    8989        $user->user_email = wp_specialchars( trim( $_POST['email'] )); 
    9090    if ( isset( $_POST['url'] ) ) { 
    91         $user->user_url = clean_url( trim( $_POST['url'] )); 
    92         $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; 
     91        if ( empty ( $_POST['url'] ) || $_POST['url'] == 'http://' ) { 
     92            $user->user_url = ''; 
     93        } else { 
     94            $user->user_url = clean_url( trim( $_POST['url'] )); 
     95            $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; 
     96        } 
    9397    } 
    9498    if ( isset( $_POST['first_name'] )) 
Note: See TracChangeset for help on using the changeset viewer.