String.isHTMLSafe()

isHTMLSafeBooleanpublicstatic

Defined in packages/ember-htmlbars/lib/utils/string.js:101

Detects if a string was decorated using Ember.String.htmlSafe.

var plainString = 'plain string',
    safeString = Ember.String.htmlSafe('<div>someValue</div>');

Ember.String.isHTMLSafe(plainString); // false
Ember.String.isHTMLSafe(safeString);  // true

Returns:

Boolean
`true` if the string was decorated with `htmlSafe`, `false` otherwise.
doc_EmberJs
2016-11-30 16:53:30
Comments
Leave a Comment

Please login to continue.