Skip to:
Content

bbPress.org

Changeset 2448 for trunk/bb-settings.php


Ignore:
Timestamp:
06/28/2010 07:24:26 PM (11 years ago)
Author:
chrishajer
Message:

Attempt to fix "double slash" issue when deep integrating with WordPress 3.0 (only.) Fixes #1194. Props GautamGupta

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bb-settings.php

    r2412 r2448  
    480480require_once( BB_PATH . BB_INC . 'functions.bb-script-loader.php' );
    481481
    482 // Sanitise external input
    483 $_GET    = bb_global_sanitize( $_GET );
    484 $_POST   = bb_global_sanitize( $_POST );
    485 $_COOKIE = bb_global_sanitize( $_COOKIE, false );
    486 $_SERVER = bb_global_sanitize( $_SERVER );
    487 
     482/* Check if the globals have been sanitized by WordPress or not (else there would be extra slashes while deep integration) */
     483if ( !function_exists( 'wp_magic_quotes' ) ) {
     484    // Sanitise external input
     485    $_GET    = bb_global_sanitize( $_GET );
     486    $_POST   = bb_global_sanitize( $_POST );
     487    $_COOKIE = bb_global_sanitize( $_COOKIE, false );
     488    $_SERVER = bb_global_sanitize( $_SERVER );
     489}
    488490
    489491
Note: See TracChangeset for help on using the changeset viewer.