@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.
@@ -9106,7 +9106,17 @@ var Uploader = /** @__PURE__ @class */ (function (_super) {
9106
9106
  for (var i = 0; i < fileData.length; i++) {
9107
9107
  var sanitizeFile = SanitizeHtmlHelper.beforeSanitize();
9108
9108
  var sanitizeFileName = SanitizeHtmlHelper.serializeValue(sanitizeFile, fileData[parseInt(i.toString())].name);
9109
- if (sanitizeFileName !== fileData[parseInt(i.toString())].name) {
9109
+ var currentFileName = fileData[parseInt(i.toString())].name;
9110
+ var isUTF8 = false;
9111
+ for (var i_1 = 0; i_1 < currentFileName.length; i_1++) {
9112
+ if (currentFileName.charCodeAt(i_1) > 127) {
9113
+ isUTF8 = true;
9114
+ break;
9115
+ }
9116
+ }
9117
+ var htmlTagRegex = /<([a-z][a-z0-9]*)\b[^>]*>(.*?)<\/\1>/i;
9118
+ var hasHTMLString = htmlTagRegex.test(currentFileName);
9119
+ if ((sanitizeFileName !== fileData[parseInt(i.toString())].name) && !(isUTF8 && !hasHTMLString)) {
9110
9120
  var encodedFileName = targetFiles[parseInt(i.toString())].name.replace(/[\u00A0-\u9999<>\&]/g, function (i) {
9111
9121
  return '&#' + i.charCodeAt(0) + ';';
9112
9122
  });