diff --git a/demo/script.js b/demo/script.js index 044ab9e..df3218c 100644 --- a/demo/script.js +++ b/demo/script.js @@ -26,6 +26,7 @@ function fillExample() { * */ function doSanitize() { + /* globals contextSelect */ const context = contextSelect.value; const inputValue = inputEl.value; const contextEl = document.createElement(context); @@ -33,4 +34,3 @@ function doSanitize() { toutEl.value = contextEl.innerHTML; houtEl.replaceChildren(contextEl); } - diff --git a/src/sanitizer.js b/src/sanitizer.js index df54086..4a7920a 100644 --- a/src/sanitizer.js +++ b/src/sanitizer.js @@ -36,6 +36,7 @@ export const _normalizeConfig = function _normalizeConfig(config) { let normalizedConfig = {}; // TODO https://github.com/mozilla/sanitizer-polyfill/issues/29 + // eslint-disable-next-line compat/compat for (let [configurationElementList, elements] of Object.entries(config)) { if (SUPPORTED_CONFIGURATION_LISTS.has(configurationElementList)) { normalizedConfig[configurationElementList] = elements.map((element) => { @@ -54,6 +55,7 @@ export const _normalizeConfig = function _normalizeConfig(config) { } const allowElements = + // eslint-disable-next-line compat/compat normalizedConfig.allowElements || Array.from(DEFAULT_ALLOWED_ELEMENTS); const allowAttributes = normalizedConfig.allowAttributes || DEFAULT_ALLOWED_ATTRIBUTES;