From 239eac7799d4288eca6f57af6a0d1b27e6e0bd4f Mon Sep 17 00:00:00 2001 From: Mark VanLandingham Date: Fri, 19 Apr 2024 09:11:03 -0500 Subject: [PATCH] DEV: Allow auth errors to render HTML (#26686) --- .../discourse/app/instance-initializers/auth-complete.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/app/instance-initializers/auth-complete.js b/app/assets/javascripts/discourse/app/instance-initializers/auth-complete.js index 2fb8c842a7b..367d6f0b0fd 100644 --- a/app/assets/javascripts/discourse/app/instance-initializers/auth-complete.js +++ b/app/assets/javascripts/discourse/app/instance-initializers/auth-complete.js @@ -1,5 +1,6 @@ import EmberObject from "@ember/object"; import { next } from "@ember/runloop"; +import { htmlSafe } from "@ember/template"; import CreateAccount from "discourse/components/modal/create-account"; import LoginModal from "discourse/components/modal/login"; import cookie, { removeCookie } from "discourse/lib/cookie"; @@ -90,7 +91,7 @@ export default { for (let i = 0; i < AuthErrors.length; i++) { const cond = AuthErrors[i]; if (options[cond]) { - return loginError(I18n.t(`login.${cond}`)); + return loginError(htmlSafe(I18n.t(`login.${cond}`))); } }