@grafana/data: fix build issue caused by merge of #43222 after #43423 (#43436)

pull/43448/head
Todd Treece 4 years ago committed by GitHub
parent 119f756c0e
commit 6b0f5d464b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 10
      packages/grafana-data/src/text/sanitize.ts

@ -1,12 +1,12 @@
import { FilterXSS, whiteList, IWhiteList } from 'xss'; import * as xss from 'xss';
import { sanitizeUrl as braintreeSanitizeUrl } from '@braintree/sanitize-url'; import { sanitizeUrl as braintreeSanitizeUrl } from '@braintree/sanitize-url';
const XSSWL = Object.keys(whiteList).reduce((acc, element) => { const XSSWL = Object.keys(xss.whiteList).reduce((acc, element) => {
acc[element] = whiteList[element]?.concat(['class', 'style']); acc[element] = xss.whiteList[element]?.concat(['class', 'style']);
return acc; return acc;
}, {} as IWhiteList); }, {} as xss.IWhiteList);
const sanitizeXSS = new FilterXSS({ const sanitizeXSS = new xss.FilterXSS({
whiteList: XSSWL, whiteList: XSSWL,
}); });

Loading…
Cancel
Save