Customizable sanitizer

Agreed. SanitizedText.fromPlainText() makes more sense here, but it can mislead to the idea that this factory method will sanitize the text, right? 
Yeah, the return of sanitizer.sanitize should be a SanitizedText, thanks :D