Web Security · Middle · Question 6 of 75
What does Angular's bypassSecurityTrustHtml() do?
- 1Sanitizes HTML more strictly than the default
- 2Encrypts HTML before inserting it into the template
- ✓Correct answer: Marks a value as trusted, turning off Angular's built-in sanitization for it
Explanation
Angular sanitizes values bound to [innerHTML] by default. Bypass methods should be rare and applied only to content you fully control.