XssSanitizerService

A built in service supporting the sanitization of plain text and html content

PlainText

PlainText(userInput: string): string
Sanitizes the given input and returns a plain text string.

Html

Html(userInput: string): string
Sanitizes the given input, removing potential unsafe attributes, but allowing other html. Use this when you need to support user's editing content with a WYSIWYG editor.