sanitizeHtml method
String?
sanitizeHtml(
- dynamic value
)
Implementation
@override
String? sanitizeHtml(value) {
if (value == null) return null;
if (value is SafeHtml) {
// print(
// 'Value is SafeHtml! Allowing ${value.changingThisWillBypassSecurityTrust}');
return value.changingThisWillBypassSecurityTrust;
}
if (value is SafeValue) {
throw UnsupportedError(
'Unexpected SecurityContext $value, expecting html');
}
// print('Uh oh, falling back to internal sanitizing...');
return sanitizeHtmlInternal(unsafeCast(value));
}