mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 04:34:32 +08:00
FIX: Allow staff to use HTML in the category read only banner
This commit is contained in:
parent
891987a284
commit
901ae1ddd1
|
@ -1,7 +1,7 @@
|
|||
{{#if shouldShow}}
|
||||
<div class="row">
|
||||
<div class="alert alert-info category-read-only-banner">
|
||||
{{category.read_only_banner}}
|
||||
{{html-safe category.read_only_banner}}
|
||||
</div>
|
||||
</div>
|
||||
{{/if}}
|
||||
|
|
|
@ -29,7 +29,7 @@ acceptance("Category Banners", {
|
|||
slug: "test-read-only-with-banner",
|
||||
permission: null,
|
||||
read_only_banner:
|
||||
"You need to video yourself doing the secret handshake to post here",
|
||||
"You need to video yourself <div class='inner'>doing</div> the secret handshake to post here",
|
||||
},
|
||||
],
|
||||
},
|
||||
|
@ -55,6 +55,10 @@ QUnit.test("Displays category banners when set", async (assert) => {
|
|||
await click(".modal-footer>.btn-primary");
|
||||
assert.ok(!visible(".bootbox.modal"), "it closes the modal");
|
||||
assert.ok(visible(".category-read-only-banner"), "it shows a banner");
|
||||
assert.ok(
|
||||
find(".category-read-only-banner .inner").length === 1,
|
||||
"it allows staff to embed html in the message"
|
||||
);
|
||||
});
|
||||
|
||||
acceptance("Anonymous Category Banners", {
|
||||
|
|
Loading…
Reference in New Issue
Block a user