sanitizeResourceUrl method

  1. @override
String? sanitizeResourceUrl(
  1. dynamic value
)

Implementation

@override
String? sanitizeResourceUrl(value) {
  if (value == null) return null;
  if (value is SafeResourceUrl) {
    return value.changingThisWillBypassSecurityTrust;
  }
  if (value is SafeValue) {
    throw UnsupportedError('Unexpected SecurityContext $value, '
        'expecting resource url');
  }
  throw UnsupportedError(
      'Security violation in resource url. Create SafeValue');
}