@syncfusion/ej2-base 23.1.40 → 23.1.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -1
- package/{ReadMe.md → README.md} +1 -1
- package/bin/syncfusion-license.js +1 -1
- package/dist/ej2-base.min.js +10 -1
- package/dist/ej2-base.umd.min.js +10 -1
- package/dist/ej2-base.umd.min.js.map +1 -1
- package/dist/es6/ej2-base.es2015.js +4 -44
- package/dist/es6/ej2-base.es2015.js.map +1 -1
- package/dist/es6/ej2-base.es5.js +4 -44
- package/dist/es6/ej2-base.es5.js.map +1 -1
- package/dist/global/ej2-base.min.js +10 -1
- package/dist/global/ej2-base.min.js.map +1 -1
- package/dist/global/index.d.ts +9 -0
- package/package.json +173 -182
- package/src/fetch.js +1 -1
- package/src/intl/date-parser.js +1 -0
- package/src/sanitize-helper.d.ts +0 -1
- package/src/sanitize-helper.js +1 -42
- package/src/template.js +1 -1
package/dist/es6/ej2-base.es5.js
CHANGED
|
@@ -2098,6 +2098,7 @@ var DateParser = /** @__PURE__ @class */ (function () {
|
|
|
2098
2098
|
// eslint-disable-next-line
|
|
2099
2099
|
matchString = ((prop === 'month') && (!parseOptions.isIslamic) && (parseOptions.culture === 'en' || parseOptions.culture === 'en-GB' || parseOptions.culture === 'en-US'))
|
|
2100
2100
|
? matchString[0].toUpperCase() + matchString.substring(1).toLowerCase() : matchString;
|
|
2101
|
+
matchString = ((prop !== 'month') && (prop === 'designator') && parseOptions.culture === 'en-GB') ? matchString.toLowerCase() : matchString;
|
|
2101
2102
|
// eslint-disable-next-line
|
|
2102
2103
|
retOptions[prop] = parseOptions[prop][matchString];
|
|
2103
2104
|
}
|
|
@@ -4265,7 +4266,7 @@ var Fetch = /** @__PURE__ @class */ (function () {
|
|
|
4265
4266
|
return this.fetchResponse.then(function (response) {
|
|
4266
4267
|
_this.triggerEvent(_this['onLoad'], response);
|
|
4267
4268
|
if (!response.ok) {
|
|
4268
|
-
throw
|
|
4269
|
+
throw response;
|
|
4269
4270
|
}
|
|
4270
4271
|
var responseType = 'text';
|
|
4271
4272
|
for (var _i = 0, _a = Object.keys(contentTypes); _i < _a.length; _i++) {
|
|
@@ -9594,7 +9595,7 @@ function evalExp(str, nameSpace, helper, ignorePrefix) {
|
|
|
9594
9595
|
}
|
|
9595
9596
|
else {
|
|
9596
9597
|
// evaluate normal expression
|
|
9597
|
-
cnt = cnt !== '' ? '"+' + addNameSpace(cnt.replace(/,/gi, '+' + nameSpace + '.'), (localKeys.indexOf(cnt) === -1), nameSpace, localKeys, ignorePrefix) + '+"' : '
|
|
9598
|
+
cnt = cnt !== '' ? '"+' + addNameSpace(cnt.replace(/,/gi, '+' + nameSpace + '.'), (localKeys.indexOf(cnt) === -1), nameSpace, localKeys, ignorePrefix) + '+"' : '${}';
|
|
9598
9599
|
}
|
|
9599
9600
|
}
|
|
9600
9601
|
return cnt;
|
|
@@ -9987,7 +9988,7 @@ var SanitizeHtmlHelper = /** @__PURE__ @class */ (function () {
|
|
|
9987
9988
|
this.removeAttrs = item.selectors.attributes;
|
|
9988
9989
|
this.removeTags = item.selectors.tags;
|
|
9989
9990
|
this.wrapElement = document.createElement('div');
|
|
9990
|
-
this.wrapElement.innerHTML =
|
|
9991
|
+
this.wrapElement.innerHTML = value;
|
|
9991
9992
|
this.removeXssTags();
|
|
9992
9993
|
this.removeJsEvents();
|
|
9993
9994
|
this.removeXssAttrs();
|
|
@@ -9995,47 +9996,6 @@ var SanitizeHtmlHelper = /** @__PURE__ @class */ (function () {
|
|
|
9995
9996
|
this.removeElement();
|
|
9996
9997
|
return tempEleValue.replace(/&/g, '&');
|
|
9997
9998
|
};
|
|
9998
|
-
SanitizeHtmlHelper.sanitizeQuotes = function (input) {
|
|
9999
|
-
var sanityChars = [96, 39, 34];
|
|
10000
|
-
var escape = 92;
|
|
10001
|
-
var sanitizedValue = '';
|
|
10002
|
-
var quoteCounts = {
|
|
10003
|
-
96: 0,
|
|
10004
|
-
39: 0,
|
|
10005
|
-
34: 0
|
|
10006
|
-
};
|
|
10007
|
-
var isPreviousCharBackslash = false;
|
|
10008
|
-
for (var i = 0; i < input.length; i++) {
|
|
10009
|
-
var currentChar = input.charCodeAt(i);
|
|
10010
|
-
if (sanityChars.indexOf(currentChar) !== -1 && !isPreviousCharBackslash) {
|
|
10011
|
-
quoteCounts[currentChar + '']++;
|
|
10012
|
-
}
|
|
10013
|
-
isPreviousCharBackslash = currentChar === escape;
|
|
10014
|
-
}
|
|
10015
|
-
try {
|
|
10016
|
-
// Replace the quotes which has total count is in odd number
|
|
10017
|
-
// Previous char is not backslash, open parenthesis and
|
|
10018
|
-
// Next is not close parenthesis
|
|
10019
|
-
for (var i = 0; i < input.length; i++) {
|
|
10020
|
-
var currentChar = input.charCodeAt(i);
|
|
10021
|
-
var previousChar = i > 0 ? input.charCodeAt(i - 1) : null;
|
|
10022
|
-
var nextChar = i < input.length - 1 ? input.charCodeAt(i + 1) : null;
|
|
10023
|
-
if (sanityChars.indexOf(currentChar) !== -1 && previousChar !== escape) {
|
|
10024
|
-
if (quoteCounts[currentChar + ''] % 2 === 1 && previousChar !== 40 && nextChar !== 41) {
|
|
10025
|
-
sanitizedValue += String.fromCharCode(escape);
|
|
10026
|
-
}
|
|
10027
|
-
sanitizedValue += input[i + ''];
|
|
10028
|
-
}
|
|
10029
|
-
else {
|
|
10030
|
-
sanitizedValue += input[i + ''];
|
|
10031
|
-
}
|
|
10032
|
-
}
|
|
10033
|
-
return sanitizedValue;
|
|
10034
|
-
}
|
|
10035
|
-
catch (error) {
|
|
10036
|
-
return input;
|
|
10037
|
-
}
|
|
10038
|
-
};
|
|
10039
9999
|
SanitizeHtmlHelper.removeElement = function () {
|
|
10040
10000
|
// Removes an element's attibute to avoid html tag validation
|
|
10041
10001
|
var nodes = this.wrapElement.children;
|