diff --git a/ghost/admin/app/components/gh-posts-list-item.js b/ghost/admin/app/components/gh-posts-list-item.js index eda9f38f93..093494a005 100644 --- a/ghost/admin/app/components/gh-posts-list-item.js +++ b/ghost/admin/app/components/gh-posts-list-item.js @@ -25,7 +25,7 @@ export default Ember.Component.extend({ }), authorAvatarBackground: Ember.computed('authorAvatar', function () { - return `background-image: url(${this.get('authorAvatar')})`.htmlSafe(); + return Ember.String.htmlSafe(`background-image: url(${this.get('authorAvatar')})`); }), viewOrEdit: Ember.computed('previewIsHidden', function () { diff --git a/ghost/admin/app/components/gh-profile-image.js b/ghost/admin/app/components/gh-profile-image.js index 9a53faa69f..68e28a9b89 100644 --- a/ghost/admin/app/components/gh-profile-image.js +++ b/ghost/admin/app/components/gh-profile-image.js @@ -48,10 +48,12 @@ export default Ember.Component.extend({ const email = this.get('validEmail'), size = this.get('size'); + let style = ''; if (email) { let url = `http://www.gravatar.com/avatar/${md5(email)}?s=${size}&d=blank`; - return Ember.String.htmlSafe(`background-image: url(${url})`); + style = `background-image: url(${url})`; } + return Ember.String.htmlSafe(style); }), didInsertElement: function () { diff --git a/ghost/admin/app/components/gh-user-active.js b/ghost/admin/app/components/gh-user-active.js index cebba28329..137ca8cf10 100644 --- a/ghost/admin/app/components/gh-user-active.js +++ b/ghost/admin/app/components/gh-user-active.js @@ -14,7 +14,7 @@ export default Ember.Component.extend({ userImageBackground: Ember.computed('user.image', 'userDefault', function () { var url = this.get('user.image') || this.get('userDefault'); - return `background-image: url(${url})`.htmlSafe(); + return Ember.String.htmlSafe(`background-image: url(${url})`); }), lastLogin: Ember.computed('user.last_login', function () { diff --git a/ghost/admin/app/controllers/team/user.js b/ghost/admin/app/controllers/team/user.js index 7c374102a9..9e17e5883d 100644 --- a/ghost/admin/app/controllers/team/user.js +++ b/ghost/admin/app/controllers/team/user.js @@ -56,7 +56,7 @@ export default Ember.Controller.extend(ValidationEngine, { userImageBackground: Ember.computed('user.image', 'userDefault', function () { var url = this.get('user.image') || this.get('userDefault'); - return `background-image: url(${url})`.htmlSafe(); + return Ember.String.htmlSafe(`background-image: url(${url})`); }), // end duplicated @@ -68,7 +68,7 @@ export default Ember.Controller.extend(ValidationEngine, { coverImageBackground: Ember.computed('user.cover', 'coverDefault', function () { var url = this.get('user.cover') || this.get('coverDefault'); - return `background-image: url(${url})`.htmlSafe(); + return Ember.String.htmlSafe(`background-image: url(${url})`); }), coverTitle: Ember.computed('user.name', function () { diff --git a/ghost/admin/app/templates/team/user.hbs b/ghost/admin/app/templates/team/user.hbs index c2254f786a..77bfa89ce2 100644 --- a/ghost/admin/app/templates/team/user.hbs +++ b/ghost/admin/app/templates/team/user.hbs @@ -36,7 +36,7 @@