I have used sanitize-html
package (justification: https://www.npmtrends.com/sanitize-html-vs-dompurify) to have a rather simplistic value converter.
import sanitizeHtml = require("sanitize-html");
export class SanitizeHtmlValueConverter {
public toView(value: string) {
return !!value ? sanitizeHtml(value) : "";
}
}
And then used it as
<my-el innerhtml.bind="htmlString|sanitizeHtml"></my-el>
Is this good enough? Or am I missing something?