Skip to:
Content

BuddyPress.org

Ticket #1728: 1728.004.diff

File 1728.004.diff, 4.4 KB (added by cnorris23, 14 years ago)

replace deprecated clean_url() with esc_url()

  • bp-activity.php

     
    172172                if ( is_user_logged_in() )
    173173                        bp_core_redirect( $bp->loggedin_user->domain );
    174174                else
    175                         bp_core_redirect( site_url( 'wp-login.php?redirect_to=' . clean_url( $bp->root_domain . '/' . $bp->activity->slug . '/p/' . $bp->current_action ) ) );
     175                        bp_core_redirect( site_url( 'wp-login.php?redirect_to=' . esc_url( $bp->root_domain . '/' . $bp->activity->slug . '/p/' . $bp->current_action ) ) );
    176176        }
    177177
    178178        bp_core_load_template( apply_filters( 'bp_activity_template_profile_activity_permalink', 'members/single/activity/permalink' ) );
  • bp-core/bp-core-signup.php

     
    531531
    532532function bp_core_signup_send_validation_email( $user_id, $user_email, $key ) {
    533533        $activate_url = bp_get_activation_page() ."?key=$key";
    534         $activate_url = clean_url( $activate_url );
     534        $activate_url = esc_url( $activate_url );
    535535        $admin_email = get_site_option( "admin_email" );
    536536
    537537        if ( empty( $admin_email ) )
  • bp-core/bp-core-filters.php

     
    174174
    175175        // Send email with activation link.
    176176        $activate_url = bp_get_activation_page() ."?key=$key";
    177         $activate_url = clean_url($activate_url);
     177        $activate_url = esc_url($activate_url);
    178178
    179179        $admin_email = get_site_option( "admin_email" );
    180180
     
    183183
    184184        $from_name = ( '' == get_site_option( "site_name" ) ) ? 'WordPress' : wp_specialchars( get_site_option( "site_name" ) );
    185185        $message_headers = "MIME-Version: 1.0\n" . "From: \"{$from_name}\" <{$admin_email}>\n" . "Content-Type: text/plain; charset=\"" . get_option('blog_charset') . "\"\n";
    186         $message = sprintf(__("Thanks for registering! To complete the activation of your account and blog, please click the following link:\n\n%1$s\n\n\n\nAfter you activate, you can visit your blog here:\n\n%2$s", 'buddypress' ), $activate_url, clean_url("http://{$domain}{$path}" ) );
    187         $subject = '[' . $from_name . '] ' . sprintf(__('Activate %s', 'buddypress' ), clean_url('http://' . $domain . $path));
     186        $message = sprintf(__("Thanks for registering! To complete the activation of your account and blog, please click the following link:\n\n%1$s\n\n\n\nAfter you activate, you can visit your blog here:\n\n%2$s", 'buddypress' ), $activate_url, esc_url("http://{$domain}{$path}" ) );
     187        $subject = '[' . $from_name . '] ' . sprintf(__('Activate %s', 'buddypress' ), esc_url('http://' . $domain . $path));
    188188
    189189        /* Send the message */
    190190        $to = apply_filters( 'bp_core_activation_signup_blog_notification_to', $user_email );
     
    203203        global $current_site;
    204204
    205205        $activate_url = bp_get_activation_page() ."?key=$key";
    206         $activate_url = clean_url($activate_url);
     206        $activate_url = esc_url($activate_url);
    207207        $admin_email = get_site_option( "admin_email" );
    208208
    209209        if ( empty( $admin_email ) )
     
    215215
    216216        $from_name = ( '' == get_site_option( "site_name" ) ) ? 'WordPress' : wp_specialchars( get_site_option( "site_name" ) );
    217217        $message_headers = "MIME-Version: 1.0\n" . "From: \"{$from_name}\" <{$admin_email}>\n" . "Content-Type: text/plain; charset=\"" . get_option('blog_charset') . "\"\n";
    218         $message = sprintf( __( "Thanks for registering! To complete the activation of your account please click the following link:\n\n%s\n\n", 'buddypress' ), $activate_url . $email, clean_url("http://{$domain}{$path}" ) );
     218        $message = sprintf( __( "Thanks for registering! To complete the activation of your account please click the following link:\n\n%s\n\n", 'buddypress' ), $activate_url . $email, esc_url("http://{$domain}{$path}" ) );
    219219        $subject = '[' . $from_name . '] ' . __( 'Activate Your Account', 'buddypress' );
    220220
    221221        /* Send the message */
  • bp-core/bp-core-catchuri.php

     
    4545        if ( strpos( $_SERVER['REQUEST_URI'], 'wp-load.php' ) )
    4646                $path = bp_core_referrer();
    4747        else
    48                 $path = clean_url( $_SERVER['REQUEST_URI'] );
     48                $path = esc_url( $_SERVER['REQUEST_URI'] );
    4949
    5050        $path = apply_filters( 'bp_uri', $path );
    5151