From a945ca3e011e19ab69e67939dfc3d926553adc5a Mon Sep 17 00:00:00 2001 From: Penar Musaraj Date: Fri, 17 Feb 2023 11:23:25 -0500 Subject: [PATCH] FIX: Allow HTML in category read-only dialog (#20349) We allow HTML for this string in `category-read-only-banner.hbs`, this makes it consistent for the dialog. --- .../javascripts/discourse/app/components/d-navigation.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/discourse/app/components/d-navigation.js b/app/assets/javascripts/discourse/app/components/d-navigation.js index 2153fc5f9ce..73e63a5d21e 100644 --- a/app/assets/javascripts/discourse/app/components/d-navigation.js +++ b/app/assets/javascripts/discourse/app/components/d-navigation.js @@ -4,6 +4,7 @@ import NavItem from "discourse/models/nav-item"; import discourseComputed from "discourse-common/utils/decorators"; import { NotificationLevels } from "discourse/lib/notification-levels"; import { getOwner } from "discourse-common/lib/get-owner"; +import { htmlSafe } from "@ember/template"; import { inject as service } from "@ember/service"; export default Component.extend(FilterModeMixin, { @@ -157,7 +158,7 @@ export default Component.extend(FilterModeMixin, { clickCreateTopicButton() { if (this.categoryReadOnlyBanner && !this.hasDraft) { - this.dialog.alert(this.categoryReadOnlyBanner); + this.dialog.alert({ message: htmlSafe(this.categoryReadOnlyBanner) }); } else { this.createTopic(); }