diff --git a/src/sanitizer.js b/src/sanitizer.js index a72ce13d0758..fd9bcbbd7612 100644 --- a/src/sanitizer.js +++ b/src/sanitizer.js @@ -278,6 +278,8 @@ export function sanitizeHtml(html) { const attrName = attribs[i]; const attrValue = attribs[i + 1]; if (!isValidAttr(tagName, attrName, attrValue)) { + user().error(TAG, `Removing "${attrName}" attribute with invalid ` + + `value in <${tagName} ${attrName}="${attrValue}">.`); continue; } emit(' '); @@ -357,7 +359,6 @@ export function sanitizeFormattingHtml(html) { * @return {boolean} */ export function isValidAttr(tagName, attrName, attrValue) { - // "on*" attributes are not allowed. if (startsWith(attrName, 'on') && attrName != 'on') { return false;