DEV: Remove 'htmlSafe' string prototype extensions (#344)
Context: https://deprecations.emberjs.com/v3.x/#toc_ember-string-prototype_extensions
This commit is contained in:
parent
0d2a02a0db
commit
201f115387
|
@ -8,6 +8,7 @@ import { action } from "@ember/object";
|
|||
import getURL from "discourse-common/lib/get-url";
|
||||
import { iconHTML } from "discourse-common/lib/icon-library";
|
||||
import I18n from "I18n";
|
||||
import { htmlSafe } from "@ember/template";
|
||||
|
||||
export default UserTopicsList.extend({
|
||||
user: controller(),
|
||||
|
@ -29,10 +30,12 @@ export default UserTopicsList.extend({
|
|||
|
||||
@discourseComputed
|
||||
emptyStateBody() {
|
||||
return I18n.t("user.no_assignments_body", {
|
||||
return htmlSafe(
|
||||
I18n.t("user.no_assignments_body", {
|
||||
preferencesUrl: getURL("/my/preferences/notifications"),
|
||||
icon: iconHTML("user-plus"),
|
||||
}).htmlSafe();
|
||||
})
|
||||
);
|
||||
},
|
||||
|
||||
refreshModel() {
|
||||
|
|
|
@ -9,6 +9,7 @@ import getURL from "discourse-common/lib/get-url";
|
|||
import { postUrl } from "discourse/lib/utilities";
|
||||
import { h } from "virtual-dom";
|
||||
import I18n from "I18n";
|
||||
import { htmlSafe } from "@ember/template";
|
||||
|
||||
const ICON = "user-plus";
|
||||
const GROUP_ICON = "group-plus";
|
||||
|
@ -22,10 +23,12 @@ createWidget("no-quick-access-assignments", {
|
|||
new RawHtml({
|
||||
html:
|
||||
"<p>" +
|
||||
htmlSafe(
|
||||
I18n.t("user.no_assignments_body", {
|
||||
preferencesUrl: getURL("/my/preferences/notifications"),
|
||||
icon: iconHTML(ICON),
|
||||
}).htmlSafe() +
|
||||
})
|
||||
) +
|
||||
"</p>",
|
||||
})
|
||||
),
|
||||
|
|
Loading…
Reference in New Issue