2.0.2 • Published 8 years ago

ember-sanitize v2.0.2

Weekly downloads
455
License
MIT
Repository
github
Last release
8 years ago

ember-sanitize

An Ember CLI addon to sanitize user provided content using sanitize.js.

Using

Installation

Install this addon via npm:

npm install --save-dev ember-sanitize

Then run the generator to install sanitize.js:

ember generate ember-sanitize

Usage

Simply use the sanitize-html helper in your template:

{{sanitize-html someValue}}

This will use the most restrictive sanititizer config by default, which will strip all HTML.

To use your own sanitizer configuration, add a file to /app/sanitizers/ which exports an object conforming to sanitizer's configuration options.

For example:

// /app/sanitizers/strict.js
export default {
  elements: ['b', 'em', 'i', 'strong', 'u']
};

You can then use this configuration by passing it in as the second argument to the helper:

{{sanitize-html someValue "strict"}}

Developing

Installation

  • git clone this repository
  • npm install
  • bower install

Running

Running Tests

  • ember test
  • ember test --server
2.0.2

8 years ago

2.0.1

9 years ago

2.0.0

9 years ago

1.1.1

10 years ago

1.1.0

10 years ago

1.0.0

10 years ago

0.0.6

11 years ago

0.0.5

11 years ago

0.0.4

11 years ago

0.0.3

11 years ago

0.0.2

11 years ago

0.0.1

11 years ago