DEV: Remove 'htmlSafe' string prototype extensions (#16766)
Context: https://deprecations.emberjs.com/v3.x/#toc_ember-string-prototype_extensions
This commit is contained in:
@@ -2,6 +2,7 @@ import Component from "@ember/component";
|
||||
import I18n from "I18n";
|
||||
import discourseComputed from "discourse-common/utils/decorators";
|
||||
import { iconHTML } from "discourse-common/lib/icon-library";
|
||||
import { htmlSafe } from "@ember/template";
|
||||
|
||||
export default Component.extend({
|
||||
classes: ["text-muted", "text-danger", "text-successful", "text-muted"],
|
||||
@@ -28,7 +29,7 @@ export default Component.extend({
|
||||
this._super(...arguments);
|
||||
this.set(
|
||||
"circleIcon",
|
||||
iconHTML(this.icon, { class: this.class }).htmlSafe()
|
||||
htmlSafe(iconHTML(this.icon, { class: this.class }))
|
||||
);
|
||||
this.set(
|
||||
"deliveryStatus",
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
import Helper from "@ember/component/helper";
|
||||
import { iconHTML } from "discourse-common/lib/icon-library";
|
||||
import { htmlSafe } from "@ember/template";
|
||||
|
||||
export default Helper.extend({
|
||||
compute([disposition]) {
|
||||
@@ -22,6 +23,6 @@ export default Helper.extend({
|
||||
break;
|
||||
}
|
||||
}
|
||||
return iconHTML(icon, { title }).htmlSafe();
|
||||
return htmlSafe(iconHTML(icon, { title }));
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user