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-forums/bp-forums-templatetags.php

    r3479 r3511  
    10311031    $search_value = __( 'Search anything...', 'buddypress' );
    10321032    if ( !empty( $_REQUEST['fs'] ) )
    1033         $search_value = $_REQUEST['fs'];
     1033        $search_value = stripslashes( $_REQUEST['fs'] );
    10341034
    10351035?>
    10361036    <form action="" method="get" id="search-forums-form">
    1037         <label><input type="text" name="s" id="forums_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>
     1037        <label><input type="text" name="s" id="forums_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>
    10381038        <input type="submit" id="forums_search_submit" name="forums_search_submit" value="<?php _e( 'Search', 'buddypress' ) ?>" />
    10391039    </form>
Note: See TracChangeset for help on using the changeset viewer.