Coding task · Angular course · Module 12: Security and Performance

Practice: Safe HTML

The sanitizer service from @angular/platform-browser has separate methods that mark a value as trusted in different contexts (HTML, style, URL, resource URL, script). Use them ONLY for trusted content; without them [innerHTML] sanitizes the value automatically and strips dangerous parts.

Task

Complete the component that displays trusted HTML from a CMS.