WordPress.org

Make WordPress Core

Ticket #10319: wp30-import-users.diff

File wp30-import-users.diff, 759 bytes (added by yoavf, 10 years ago)
  • wp-admin/import/wordpress.php

     
    248248        function users_form($n, $author) {
    249249
    250250                if ( $this->allow_create_users() ) {
    251                         printf('<label>'.__('Create user %1$s or map to existing'), ' <input type="text" value="'. esc_attr($author) .'" name="'.'user_create['.intval($n).']'.'" maxlength="30" /></label> <br />');
     251                        printf('<label>'.__('Create user %1$s or map to existing'), ' <input type="text" value="'. sanitize_user($author, true) .'" name="'.'user_create['.intval($n).']'.'" maxlength="30" /></label> <br />');
    252252                }
    253253                else {
    254254                        echo __('Map to existing').'<br />';