Skip to:
Content

bbPress.org


Ignore:
Timestamp:
11/29/2017 12:46:17 AM (7 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/replies/template.php

    r6737 r6745  
    459459        // Don't include pagination if on first page
    460460        if ( 1 >= $reply_page ) {
    461             $url = trailingslashit( $topic_url ) . $reply_hash;
     461            $url = user_trailingslashit( $topic_url ) . $reply_hash;
    462462
    463463        // Include pagination
     
    466466            // Pretty permalinks
    467467            if ( bbp_use_pretty_urls() ) {
    468                 $url = trailingslashit( $topic_url ) . trailingslashit( bbp_get_paged_slug() ) . trailingslashit( $reply_page ) . $reply_hash;
     468                $url = trailingslashit( $topic_url ) . trailingslashit( bbp_get_paged_slug() ) . $reply_page;
     469                $url = user_trailingslashit( $url ) . $reply_hash;
    469470
    470471            // Yucky links
Note: See TracChangeset for help on using the changeset viewer.