A polyfill for Ember.String.isHtmlSafe. See: https://github.com/emberjs/rfcs/pull/139
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
config
tests
vendor
.editorconfig
.ember-cli
.eslintrc.js
.gitignore
.npmignore
.travis.yml
.watchmanconfig
CHANGELOG.md
LICENSE.md
README.md
bower.json
ember-cli-build.js
index.js
package.json
testem.js

README.md

ember-string-ishtmlsafe-polyfill Build Status

This provides a polyfill for the Ember.String.isHTMLSafe feature added in Ember 2.8.

RFC: emberjs/rfcs#139.

PR: emberjs/ember.js#13666.

API: Ember.String.isHTMLSafe

Installation

ember install ember-string-ishtmlsafe-polyfill

Usage

import Ember from 'ember';

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

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

Migration

Applications

After you upgrade your application to Ember 2.8, you should remove ember-string-ishtmlsafe-polyfill from your package.json.

Addons

Addons generally support many different Ember versions, so leaving ember-string-ishtmlsafe-polyfill in place for consumers of your addon is perfectly normal. When the addon no longer supports Ember versions older than 2.8, we recommend removing ember-string-ishtmlsafe-polyfill from your package.json and doing a major version bump.

Compatibility

This addon is tested against each minor Ember version starting with 1.10 through 2.8 (when isHTMLSafe() landed). Additionally tested against, ember-stable, ember-beta, and ember-canary. A complete list can be found in the ember-try.js config.

Running Tests

  • npm test (Runs ember try:each to test your addon against multiple Ember versions)
  • ember test
  • ember test --server