public static String escapeHtmlAttribute ( SoyValue value ) { value = normalizeNull ( value ) ; if ( isSanitizedContentOfKind ( value , SanitizedContent . ContentKind . HTML ) ) { // |escapeHtmlAttribute should only be used on attribute values that cannot have tags. return stripHtmlTags ( value . coerceToString ( ) , null , true ) ; } return escapeHtmlAttribute ( value . coerceToString ( ) ) ; }
Converts the input to HTML by entity escaping stripping tags in sanitized content so the result can safely be embedded in an HTML attribute value .