Skip to content

A helper for safely embedding URLs in style properties

License

Notifications You must be signed in to change notification settings

yapplabs/ember-css-url

 
 

Repository files navigation

ember-css-url

A helper for safely embedding URLs in style properties. Avoids CSS XSS exposure and sanitizes user-provided URLs.

<div style={{css-url "background-image" user.avatarURL}} ></div>
<div style='background-image: url("https://example.com/avatar.png")' ></div>

Installation

  • git clone <repository-url> this repository
  • cd ember-css-url
  • yarn install

Running

Running Tests

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

Building

  • ember build

For more information on using ember-cli, visit https://ember-cli.com/.

About

A helper for safely embedding URLs in style properties

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 84.0%
  • HTML 16.0%