diff --git a/docs/labs.md b/docs/labs.md index 7f69fca6e9..60f35dd4a4 100644 --- a/docs/labs.md +++ b/docs/labs.md @@ -101,10 +101,6 @@ Under the hood this stops Element Web from adding the `perParticipantE2EE` flag This is useful while we experiment with encryption and to make calling compatible with platforms that don't use encryption yet. -## Rich text in room topics (`feature_html_topic`) [In Development] - -Enables rendering of MD / HTML in room topics. - ## Enable the notifications panel in the room header (`feature_notifications`) Unreliable in encrypted rooms. diff --git a/src/HtmlUtils.tsx b/src/HtmlUtils.tsx index 3d06b71b1e..1d17710dab 100644 --- a/src/HtmlUtils.tsx +++ b/src/HtmlUtils.tsx @@ -480,10 +480,6 @@ export function topicToHtml( ref?: LegacyRef, allowExtendedHtml = false, ): ReactNode { - if (!SettingsStore.getValue("feature_html_topic")) { - htmlTopic = undefined; - } - let isFormattedTopic = !!htmlTopic; let topicHasEmoji = false; let safeTopic = ""; diff --git a/test/unit-tests/HtmlUtils-test.tsx b/test/unit-tests/HtmlUtils-test.tsx index 1dbd9cabda..97c8da6013 100644 --- a/test/unit-tests/HtmlUtils-test.tsx +++ b/test/unit-tests/HtmlUtils-test.tsx @@ -17,10 +17,6 @@ import { SettingLevel } from "../../src/settings/SettingLevel"; import SdkConfig from "../../src/SdkConfig"; describe("topicToHtml", () => { - afterEach(() => { - SettingsStore.reset(); - }); - function getContent() { return screen.getByRole("contentinfo").children[0].innerHTML; } @@ -36,19 +32,16 @@ describe("topicToHtml", () => { }); it("converts literal HTML topic to HTML", async () => { - SettingsStore.setValue("feature_html_topic", null, SettingLevel.DEVICE, true); render(
{topicToHtml("pizza", undefined, null, false)}
); expect(getContent()).toEqual("<b>pizza</b>"); }); it("converts true HTML topic to HTML", async () => { - SettingsStore.setValue("feature_html_topic", null, SettingLevel.DEVICE, true); render(
{topicToHtml("**pizza**", "pizza", null, false)}
); expect(getContent()).toEqual("pizza"); }); it("converts true HTML topic with emoji to HTML", async () => { - SettingsStore.setValue("feature_html_topic", null, SettingLevel.DEVICE, true); render(
{topicToHtml("**pizza** 🍕", "pizza 🍕", null, false)}
); expect(getContent()).toEqual('pizza 🍕'); });