From 3be585990cd017736df97a418e135e5cf2382d5a Mon Sep 17 00:00:00 2001 From: XhmikosR Date: Fri, 12 Jun 2020 21:50:30 +0300 Subject: Comply to the new rules --- js/src/tools/sanitizer.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'js/src/tools') diff --git a/js/src/tools/sanitizer.js b/js/src/tools/sanitizer.js index 5ad77f330..ef5c1c814 100644 --- a/js/src/tools/sanitizer.js +++ b/js/src/tools/sanitizer.js @@ -77,7 +77,7 @@ function allowedAttribute(attr, allowedAttributeList) { return true } - const regExp = allowedAttributeList.filter((attrRegex) => attrRegex instanceof RegExp) + const regExp = allowedAttributeList.filter(attrRegex => attrRegex instanceof RegExp) // Check if a regular expression validates the attribute. for (let i = 0, len = regExp.length; i < len; i++) { @@ -116,7 +116,7 @@ export function sanitizeHtml(unsafeHtml, whiteList, sanitizeFn) { const attributeList = [].slice.call(el.attributes) const whitelistedAttributes = [].concat(whiteList['*'] || [], whiteList[elName] || []) - attributeList.forEach((attr) => { + attributeList.forEach(attr => { if (!allowedAttribute(attr, whitelistedAttributes)) { el.removeAttribute(attr.nodeName) } -- cgit v1.2.3