@syncfusion/ej2-dropdowns 22.2.11 → 22.2.12

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.
@@ -6987,8 +6987,6 @@ let DropDownTree = class DropDownTree extends Component {
6987
6987
  if (tempArr) {
6988
6988
  tempArr = Array.prototype.slice.call(tempArr);
6989
6989
  append(tempArr, this.noRecord);
6990
- addClass([this.noRecord], NODATACONTAINER);
6991
- prepend([this.noRecord], this.popupDiv);
6992
6990
  }
6993
6991
  }
6994
6992
  else {
@@ -6997,9 +6995,9 @@ let DropDownTree = class DropDownTree extends Component {
6997
6995
  this.l10n = new L10n(this.getLocaleName(), l10nLocale, this.locale);
6998
6996
  this.noRecord.innerHTML = actionFailure ?
6999
6997
  this.l10n.getConstant('actionFailureTemplate') : this.l10n.getConstant('noRecordsTemplate');
7000
- addClass([this.noRecord], NODATACONTAINER);
7001
- prepend([this.noRecord], this.popupDiv);
7002
6998
  }
6999
+ addClass([this.noRecord], NODATACONTAINER);
7000
+ prepend([this.noRecord], this.popupDiv);
7003
7001
  }
7004
7002
  updateRecordTemplate(action) {
7005
7003
  if (this.treeItems && this.treeItems.length <= 0) {
@@ -10952,6 +10950,11 @@ let MultiSelect = class MultiSelect extends DropDownBase {
10952
10950
  }
10953
10951
  return checkTemplate;
10954
10952
  }
10953
+ encodeHtmlEntities(input) {
10954
+ return input.replace(/[\u00A0-\u9999<>&]/g, function (match) {
10955
+ return `&#${match.charCodeAt(0)};`;
10956
+ });
10957
+ }
10955
10958
  getChip(data, value, e) {
10956
10959
  let itemData = { text: value, value: value };
10957
10960
  const chip = this.createElement('span', {
@@ -10983,7 +10986,7 @@ let MultiSelect = class MultiSelect extends DropDownBase {
10983
10986
  chipContent.innerText = data;
10984
10987
  }
10985
10988
  else {
10986
- chipContent.innerHTML = data;
10989
+ chipContent.innerHTML = this.encodeHtmlEntities(data);
10987
10990
  }
10988
10991
  chip.appendChild(chipContent);
10989
10992
  const eventArgs = {
@@ -12020,10 +12023,10 @@ let MultiSelect = class MultiSelect extends DropDownBase {
12020
12023
  }
12021
12024
  updateWrapperText(wrapperType, wrapperData) {
12022
12025
  if (this.valueTemplate || !this.enableHtmlSanitizer) {
12023
- wrapperType.innerHTML = wrapperData;
12026
+ wrapperType.innerHTML = this.encodeHtmlEntities(wrapperData);
12024
12027
  }
12025
12028
  else {
12026
- wrapperType.innerText = SanitizeHtmlHelper.sanitize(wrapperData);
12029
+ wrapperType.innerText = wrapperData;
12027
12030
  }
12028
12031
  }
12029
12032
  updateDelimView() {