Skip to content

Commit a9a945a

Browse files
authored
Merge pull request #2051 from IgniteUI/use-encodeUriComponent-192
Use encodeUriComponent instaead of escape to encode filtering params in URL
2 parents e5a1d01 + 1e40b3d commit a9a945a

3 files changed

Lines changed: 9 additions & 6 deletions

File tree

src/js/modules/infragistics.datasource.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
*
2727
*/
2828

29-
/*global Class, ActiveXObject, DOMParser, XPathResult, XMLSerializer, escape */
29+
/*global Class, ActiveXObject, DOMParser, XPathResult, XMLSerializer */
3030
(function (factory) {
3131
if (typeof define === "function" && define.amd) {
3232

@@ -5025,7 +5025,7 @@
50255025
);
50265026
/* d = ffields[i].expr.getTime(); */
50275027
} else {
5028-
d = escape(ffields[ i ].expr);
5028+
d = encodeURIComponent(ffields[ i ].expr);
50295029
}
50305030
if (params.filteringParams[ key ] === undefined) {
50315031
params.filteringParams[ key ] = ffields[ i ].cond +

tests/unit/dataSource/properties/properties-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1035,7 +1035,7 @@ QUnit.module("igDataSource Properties", {
10351035
var nYear = nextMonthDate.getFullYear();
10361036
var prevMonthYear = prevMonthDate.getFullYear();
10371037

1038-
var params = unescape($.param(dsFilter._encodeUrl()));
1038+
var params = decodeURIComponent($.param(dsFilter._encodeUrl()));
10391039
assert.equal(params,
10401040
"$filter=day(Date) eq " + date.getDate().toString() + " and month(Date) eq " + currMonth.toString() + " and year(Date) eq " + date.getFullYear().toString() +
10411041
" and month(Date2) eq " + prevMonth.toString() + " and year(Date2) eq " + prevMonthYear.toString() + " and month(Date3) eq " +

tests/unit/dataSource/remote/remote-test.js

Lines changed: 6 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)