@syncfusion/ej2-inputs 22.1.38 → 22.1.39
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 +15 -0
- package/dist/ej2-inputs.min.js +2 -2
- package/dist/ej2-inputs.umd.min.js +2 -2
- package/dist/ej2-inputs.umd.min.js.map +1 -1
- package/dist/es6/ej2-inputs.es2015.js +11 -1
- package/dist/es6/ej2-inputs.es2015.js.map +1 -1
- package/dist/es6/ej2-inputs.es5.js +11 -1
- package/dist/es6/ej2-inputs.es5.js.map +1 -1
- package/dist/global/ej2-inputs.min.js +2 -2
- package/dist/global/ej2-inputs.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +6 -6
- package/src/uploader/uploader.js +11 -1
|
@@ -8915,7 +8915,17 @@ let Uploader = class Uploader extends Component {
|
|
|
8915
8915
|
for (let i = 0; i < fileData.length; i++) {
|
|
8916
8916
|
const sanitizeFile = SanitizeHtmlHelper.beforeSanitize();
|
|
8917
8917
|
const sanitizeFileName = SanitizeHtmlHelper.serializeValue(sanitizeFile, fileData[parseInt(i.toString())].name);
|
|
8918
|
-
|
|
8918
|
+
const currentFileName = fileData[parseInt(i.toString())].name;
|
|
8919
|
+
let isUTF8 = false;
|
|
8920
|
+
for (let i = 0; i < currentFileName.length; i++) {
|
|
8921
|
+
if (currentFileName.charCodeAt(i) > 127) {
|
|
8922
|
+
isUTF8 = true;
|
|
8923
|
+
break;
|
|
8924
|
+
}
|
|
8925
|
+
}
|
|
8926
|
+
let htmlTagRegex = /<([a-z][a-z0-9]*)\b[^>]*>(.*?)<\/\1>/i;
|
|
8927
|
+
let hasHTMLString = htmlTagRegex.test(currentFileName);
|
|
8928
|
+
if ((sanitizeFileName !== fileData[parseInt(i.toString())].name) && !(isUTF8 && !hasHTMLString)) {
|
|
8919
8929
|
const encodedFileName = targetFiles[parseInt(i.toString())].name.replace(/[\u00A0-\u9999<>\&]/g, function (i) {
|
|
8920
8930
|
return '&#' + i.charCodeAt(0) + ';';
|
|
8921
8931
|
});
|