From f647718d2740e9591a4877dae817cb9801cab219 Mon Sep 17 00:00:00 2001 From: BhushanSharma Date: Wed, 17 Mar 2021 15:12:08 +0530 Subject: [PATCH] COM-3305 Escape special character on the filter --- scripts/modules/backbone-mozu-pagedcollection.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/modules/backbone-mozu-pagedcollection.js b/scripts/modules/backbone-mozu-pagedcollection.js index 6685669c9..59fd1e10c 100644 --- a/scripts/modules/backbone-mozu-pagedcollection.js +++ b/scripts/modules/backbone-mozu-pagedcollection.js @@ -2,7 +2,10 @@ "jquery", "underscore", "hyprlive", - "modules/backbone-mozu-model"], function ($, _, Hypr, Backbone) { + "modules/backbone-mozu-model", + 'modules/mozu-utilities'], function ($, _, Hypr, Backbone, MozuUtilities) { + + var utilities = MozuUtilities.Utilities; var defaultPageSize = Hypr.getThemeSetting('defaultPageSize'), defaultSort = Hypr.getThemeSetting('defaultSort'), @@ -176,7 +179,7 @@ filterBy: function (filterString) { this.lastRequest.startIndex = 0; - return this.apiGet($.extend(this.lastRequest, { filter: filterString })); + return this.apiGet($.extend(this.lastRequest, { filter: utilities.Filters.mzEscapeSpecialCharacters(filterString) })); }, initialize: function() {