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.
This commit is contained in:
Penar Musaraj 2023-02-17 11:23:25 -05:00 committed by GitHub
parent 8144730ebb
commit a945ca3e01
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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();
}