lundi 27 mars 2017

Issue with Ember Binding Style Attributes

I feel like I'm following the documentation but I must be doing something wrong. Would love your help.

In my template, I have:

<div style="">

In my component js file I have:

backgroundImage: Ember.computed('background-image', function() {
  var imageUrl = this.item.attributes.imageMain.url;
  return Ember.String.htmlSafe('background-image: url('+ imageUrl +')');
})

Things are working fine, but I'm still getting the warning in the console:

WARNING: Binding style attributes may introduce cross-site scripting vulnerabilities; please ensure that values being bound are properly escaped. For more information, including how to disable this warning, see http://ift.tt/1gF7OUZ.

Would love any help / second eye. Thanks so much!!




Aucun commentaire:

Enregistrer un commentaire