qpp-style 9.29.0 → 9.30.0

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.
@@ -192,7 +192,19 @@ const SanitizedContent = ({
192
192
  map[tag] = allowedAttributes['*'];
193
193
  return map;
194
194
  }, {});
195
- const sanitizedHTML = xss(html, { whiteList });
195
+
196
+ const xssOptions = {
197
+ whiteList,
198
+ onIgnoreTagAttr: (tag, name, value, isWhiteAttr) => {
199
+ const isDataOrAriaAttr = name.includes('data-') || name.includes('aria-');
200
+ if (isDataOrAriaAttr) {
201
+ return `${name}="${xss.escapeAttrValue(value)}"`;
202
+ }
203
+ },
204
+ };
205
+
206
+ const sanitizedHTML = xss(html, xssOptions);
207
+
196
208
  return (
197
209
  <div
198
210
  {...(customClassName && { className: customClassName })}
@@ -97,6 +97,7 @@ const SideNavUI = ({
97
97
 
98
98
  const itemsMarkup = (contentItems || []).map((item, index) => {
99
99
  const key = `${JSON.stringify(item)}-${index}-${containerRecursionId}`;
100
+
100
101
  return (
101
102
  {
102
103
  divider: (