diff --git src/bp-templates/bp-nouveau/js/buddypress-nouveau.js src/bp-templates/bp-nouveau/js/buddypress-nouveau.js
index fbfb23075..83eb0017d 100644
|
|
|
window.bp = window.bp || {}; |
| 161 | 161 | return params; |
| 162 | 162 | }, |
| 163 | 163 | |
| | 164 | /** |
| | 165 | * URL Decode a query variable. |
| | 166 | * |
| | 167 | * @param {string} qv The query variable to decode. |
| | 168 | * @param {object} chars The specific characters to use. Optionnal. |
| | 169 | * @return {string} The URL decoded variable. |
| | 170 | */ |
| | 171 | urlDecode: function( qv, chars ) { |
| | 172 | var specialChars = chars || { |
| | 173 | amp: '&', |
| | 174 | lt: '<', |
| | 175 | gt: '>', |
| | 176 | quot: '"', |
| | 177 | '#039': "'" |
| | 178 | }; |
| | 179 | |
| | 180 | return decodeURIComponent( qv.replace( /\+/g, " " ) ).replace( /&([^;]+);/g, function( v, q ) { |
| | 181 | return specialChars[q] || ''; |
| | 182 | } ); |
| | 183 | }, |
| | 184 | |
| 164 | 185 | /** |
| 165 | 186 | * [ajax description] |
| 166 | 187 | * @param {[type]} post_data [description] |
| … |
… |
window.bp = window.bp || {}; |
| 238 | 259 | return; |
| 239 | 260 | } |
| 240 | 261 | |
| | 262 | // Prepare the search terms for the request |
| | 263 | if ( data.search_terms ) { |
| | 264 | data.search_terms = data.search_terms.replace( /\</g, "<" ).replace( /\>/g, ">" ); |
| | 265 | } |
| | 266 | |
| 241 | 267 | // Set session's data |
| 242 | 268 | if ( null !== data.scope ) { |
| 243 | 269 | this.setStorage( 'bp-' + data.object, 'scope', data.scope ); |
| … |
… |
window.bp = window.bp || {}; |
| 357 | 383 | } |
| 358 | 384 | |
| 359 | 385 | if ( search_terms ) { |
| 360 | | search_terms = decodeURIComponent( search_terms.replace( /\+/g, ' ' ) ); |
| | 386 | search_terms = self.urlDecode( search_terms ); |
| 361 | 387 | $( '#buddypress [data-bp-search="' + object + '"] input[type=search]' ).val( search_terms ); |
| 362 | 388 | } |
| 363 | 389 | } |