Question · Angular course · Module 12: Security and Performance

DomSanitizer

When do we use DomSanitizer.bypassSecurityTrustHtml()?

Answer options

  • Always when displaying HTML
  • Only for trusted HTML when we deliberately want to bypass sanitization
  • For every input from the user
  • Never - it is deprecated

You can check the correct answer by solving this task in the CodeWorlds game.