feat(security): warn users when sanitizing in dev mode.
This should help developers to figure out what's going on when the sanitizer strips some input. Fixes #8522.
This commit is contained in:
@ -253,7 +253,7 @@ export function sanitizeHtml(unsafeHtml: string): string {
|
||||
}
|
||||
|
||||
if (assertionsEnabled() && safeHtml !== unsafeHtml) {
|
||||
DOM.log('WARNING: some HTML contents were removed during sanitization.');
|
||||
DOM.log('WARNING: sanitizing HTML stripped some content.');
|
||||
}
|
||||
|
||||
return safeHtml;
|
||||
|
Reference in New Issue
Block a user