public static String filterTrustedResourceUri ( SoyValue value ) { value = normalizeNull ( value ) ; if ( isSanitizedContentOfKind ( value , SanitizedContent . ContentKind . TRUSTED_RESOURCE_URI ) ) { return value . coerceToString ( ) ; } logger . log ( Level . WARNING , "|filterTrustedResourceUri received bad value ''{0}''" , value ) ; return "about:invalid#" + EscapingConventions . INNOCUOUS_OUTPUT ; }
Makes sure the given input is an instance of either trustedResourceUrl or trustedString .