Skip to:
Content

bbPress.org


Ignore:
Timestamp:
11/29/2017 12:46:17 AM (8 years ago)
Author:
johnjamesjacoby
Message:

URLs: Audit the usage of trailingslashit().

This change ensures that trailing slashes are only used at the end of URLs where they're expected, and avoids adding slashes at the end of URLs when permalinks are configured not to include them.

See #3181.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/includes/common/ajax.php

    r6583 r6745  
    3333        global $wp;
    3434
    35         $base_url = home_url( trailingslashit( $wp->request ), ( is_ssl() ? 'https' : 'http' ) );
     35        $ssl      = is_ssl() ? 'https' : 'http';
     36        $url      = trailingslashit( $wp->request );
     37        $base_url = home_url( $url, $ssl );
    3638        $ajaxurl  = add_query_arg( array( 'bbp-ajax' => 'true' ), $base_url );
    3739
Note: See TracChangeset for help on using the changeset viewer.