Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
12/04/2010 11:41:28 PM (14 years ago)
Author:
djpaul
Message:

Fix double-escaping of search string when performing search from the site-wide search box. Partially addresses #2776.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-groups/bp-groups-templatetags.php

    r3479 r3511  
    18361836
    18371837    $search_value = __( 'Search anything...', 'buddypress' );
    1838     if ( isset( $_REQUEST['s'] ) && !empty( $_REQUEST['s'] ) )
    1839         $search_value = $_REQUEST['s'];
     1838    if ( !empty( $_REQUEST['s'] ) )
     1839        $search_value = stripslashes( $_REQUEST['s'] );
    18401840
    18411841?>
    18421842    <form action="" method="get" id="search-groups-form">
    1843         <label><input type="text" name="s" id="groups_search" value="<?php echo esc_attr($search_value) ?>"  onfocus="if (this.value == '<?php _e( 'Search anything...', 'buddypress' ) ?>') {this.value = '';}" onblur="if (this.value == '') {this.value = '<?php _e( 'Search anything...', 'buddypress' ) ?>';}" /></label>
     1843        <label><input type="text" name="s" id="groups_search" value="<?php echo esc_attr( $search_value ) ?>"  onfocus="if (this.value == '<?php _e( 'Search anything...', 'buddypress' ) ?>') {this.value = '';}" onblur="if (this.value == '') {this.value = '<?php _e( 'Search anything...', 'buddypress' ) ?>';}" /></label>
    18441844        <input type="submit" id="groups_search_submit" name="groups_search_submit" value="<?php _e( 'Search', 'buddypress' ) ?>" />
    18451845    </form>
Note: See TracChangeset for help on using the changeset viewer.