File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -981,7 +981,8 @@ var unbxdSearchInit = function(jQuery, Handlebars){
981
981
var nonhistoryPath = "" ;
982
982
983
983
if ( this . options . type == "search" && this . params [ 'query' ] != undefined ) {
984
- url += '&q=' + encodeURIComponent ( this . params . query ) ;
984
+ var escapedQuery = this . params . query . replace ( / [ \- \[ \] \/ \{ \} \( \) \+ \? \. \\ \^ \$ \| ] / g, "\\$&" ) ;
985
+ url += '&q=' + encodeURIComponent ( escapedQuery ) ;
985
986
} else if ( this . options . type == "browse" && this . params [ 'categoryId' ] != undefined ) {
986
987
url += '&category-id=' + encodeURIComponent ( this . params . categoryId ) ;
987
988
}
@@ -1339,7 +1340,7 @@ var unbxdSearchInit = function(jQuery, Handlebars){
1339
1340
this . totalPages = Math . ceil ( obj . response . numberOfProducts / this . getPageSize ( ) ) ;
1340
1341
1341
1342
jQuery ( this . options . searchQueryDisplay ) . html ( this . compiledSearchQueryTemp ( {
1342
- query : obj . searchMetaData . queryParams . q
1343
+ query : obj . searchMetaData . queryParams . q . replace ( / \\ / g , "" )
1343
1344
, numberOfProducts : obj . response . numberOfProducts
1344
1345
, start : this . productStartIdx
1345
1346
, end : this . productEndIdx
You can’t perform that action at this time.
0 commit comments