Where is Aurelia 2's HTMLSanitizer?

Aurelia 1 had an HTMLSanitizer interface. This is gone in Aurelia 2?

It’s now ISanitizer, the value converter that uses this is SanitizeValueConverter

ISanitizer is no part of the aurelia package.

ahhh that’s a miss, thanks. Do you wanna help create your first PR :smiley: ?

For now, pls import it from @aurelia/runtime-html

As soon as I migrated successfully to Aurelia 2 beta 19.

1 Like

In Aurelia 2, the HTMLSanitizer interface from Aurelia 1 is removed. Use external libraries like DOMPurify for HTML sanitization instead, providing greater flexibility and security for your applications.

Can this be added to the documentsation so we know what to use without search for it online? @bigopon

I migrated our library to Aurelia 2 including Sanitizer interface using sanitize-html library. Documentation here: aurelia-components/src/value-converters/README.md at aurelia2 · telekom-mms/aurelia-components · GitHub

4 Likes