soy.data.SanitizedContent Extends
A string-like object that carries a content-type and a content direction. IMPORTANT! Do not create these directly, nor instantiate the subclasses. Instead, use a trusted, centrally reviewed library as endorsed by your team to generate these objects. Otherwise, you risk accidentally creating SanitizedContent that is attacker-controlled and gets evaluated unescaped in templates.

Inheritance

Constructor

goog.soy.data.SanitizedContent()

Instance Methods

Public Protected Private
toSafeHtml() !goog.html.SafeHtml
Converts sanitized content of kind TEXT or HTML into SafeHtml. HTML content is converted without modification, while text content is HTML-escaped.
Returns: !goog.html.SafeHtml  No description.
code »
toString()
No description.
code »

Instance Properties

content :
The already-safe content.
Code »
contentDir :
The content's direction; null if unknown and thus to be estimated when necessary.
Code »
contentKind :
The context in which this content is safe from XSS attacks.
Code »

Package soy.data

Package Reference