JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 15192
  • Score
    100M100P100Q131850F
  • License MIT

A helper for safely embedding URLs in style properties

Package Exports

  • ember-css-url
  • ember-css-url/_app_/helpers/css-url.js
  • ember-css-url/addon-main.js
  • ember-css-url/helpers/css-url.js
  • ember-css-url/index.js

Readme

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>

Compatibility

  • Ember.js v3.16 or above
  • Embroider or ember-auto-import v2
  • Node.js v14 or above

Installation

ember install ember-css-url

Usage

[Longer description of how to use the addon in apps.]

Contributing

See the Contributing guide for details.

License

This project is licensed under the MIT License.