Skip to content

Commit 7234653

Browse files
committed
rollback escaping characters on search query
1 parent 5ed0293 commit 7234653

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

unbxdSearch.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -981,8 +981,7 @@ var unbxdSearchInit = function(jQuery, Handlebars){
981981
var nonhistoryPath = "";
982982

983983
if(this.options.type == "search" && this.params['query'] != undefined){
984-
var escapedQuery = this.params.query.replace(/[\-\[\]\/\{\}\(\)\+\?\.\\\^\$\|]/g, "\\$&");
985-
url += '&q=' + encodeURIComponent(escapedQuery);
984+
url += '&q=' + encodeURIComponent(this.params.query);
986985
}else if(this.options.type == "browse" && this.params['categoryId'] != undefined){
987986
url += '&category-id=' + encodeURIComponent(this.params.categoryId);
988987
}
@@ -1340,7 +1339,7 @@ var unbxdSearchInit = function(jQuery, Handlebars){
13401339
this.totalPages = Math.ceil(obj.response.numberOfProducts/this.getPageSize());
13411340

13421341
jQuery(this.options.searchQueryDisplay).html(this.compiledSearchQueryTemp({
1343-
query : obj.searchMetaData.queryParams.q.replace(/\\/g,"")
1342+
query : obj.searchMetaData.queryParams.q
13441343
,numberOfProducts : obj.response.numberOfProducts
13451344
,start: this.productStartIdx
13461345
,end: this.productEndIdx

0 commit comments

Comments
 (0)