DEV: Remove 'htmlSafe' string prototype extensions (#344)

Context: https://deprecations.emberjs.com/v3.x/#toc_ember-string-prototype_extensions
This commit is contained in:
Isaac Janzen 2022-06-01 11:08:26 -05:00 committed by GitHub
parent 0d2a02a0db
commit 201f115387
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 8 deletions

View File

@ -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() {

View File

@ -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>",
})
),