Changeset 1276

Show
Ignore:
Timestamp:
05/08/08 09:42:09 (2 months ago)
Author:
donncha
Message:

Stripslashes the title before passing it to wpmu_create_blog(), fixes #621

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/wp-admin/wpmu-edit.php

    r1270 r1276  
    9191                $domain = strtolower( wp_specialchars( $blog['domain'] ) ); 
    9292                $email = wp_specialchars( $blog['email'] ); 
     93                $title = stripslashes( wp_specialchars( $blog['title'] ) ); 
    9394                 
    9495                if ( empty($domain) || empty($email)) 
     
    117118 
    118119                $wpdb->hide_errors(); 
    119                 $blog_id = wpmu_create_blog($newdomain, $path, wp_specialchars( $blog['title'] ), $user_id , array( "public" => 1 ), $current_site->id); 
     120                $blog_id = wpmu_create_blog($newdomain, $path, $title, $user_id , array( "public" => 1 ), $current_site->id); 
    120121                $wpdb->show_errors(); 
    121122                if( !is_wp_error($blog_id) ) { 
    122123                        if( get_user_option( $user_id, 'primary_blog' ) == 1 ) 
    123124                                update_user_option( $user_id, 'primary_blog', $blog_id, true ); 
    124                         $content_mail = sprintf(__("New blog created by %1s\n\nAddress: http://%2s\nName: %3s"), $current_user->user_login , $newdomain.$path, wp_specialchars($blog['title']) ); 
     125                        $content_mail = sprintf( __( "New blog created by %1s\n\nAddress: http://%2s\nName: %3s"), $current_user->user_login , $newdomain.$path, $title ); 
    125126                        wp_mail( get_site_option('admin_email'),  sprintf(__('[%s] New Blog Created'), $current_site->site_name), $content_mail, 'From: "Site Admin" <' . get_site_option( 'admin_email' ) . '>' ); 
    126127                        wp_redirect( add_query_arg( array('updated' => 'true', 'action' => 'add-blog'), $_SERVER['HTTP_REFERER'] ) );