intelicoreact 0.3.36 → 0.3.38

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.
@@ -170,7 +170,17 @@ var Dropdown = function Dropdown(_ref) {
170
170
  };
171
171
 
172
172
  var hightlightedText = function hightlightedText(text, postfix) {
173
- var main = searchValue ? text === null || text === void 0 ? void 0 : text.replace(new RegExp(searchValue, 'i'), function (match) {
173
+ var _text;
174
+
175
+ text = text.replace(/["&<>]/g, function (a) {
176
+ return {
177
+ '"': '&quot;',
178
+ '&': '&amp;',
179
+ '<': '&lt;',
180
+ '>': '&gt;'
181
+ }[a];
182
+ });
183
+ var main = searchValue ? (_text = text) === null || _text === void 0 ? void 0 : _text.replace(new RegExp(searchValue, 'i'), function (match) {
174
184
  return "<span class=\"bg--yellow\">".concat(match, "</span>");
175
185
  }) : text;
176
186
  var postfixPart = postfix ? "<span class=\"dropdown__list-item-postfix\">".concat(postfix, "</span>") : '';
@@ -194,7 +204,7 @@ var Dropdown = function Dropdown(_ref) {
194
204
  }, /*#__PURE__*/_react.default.createElement(_reactFeather.Check, null)), /*#__PURE__*/_react.default.createElement("div", {
195
205
  className: item.className || '',
196
206
  dangerouslySetInnerHTML: {
197
- __html: hightlightedText(escape(item.label), item.postfix)
207
+ __html: hightlightedText(item.label, item.postfix)
198
208
  }
199
209
  })) : null;
200
210
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "intelicoreact",
3
- "version": "0.3.36",
3
+ "version": "0.3.38",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "files": [