Disallow links without protocol (e.g. starting with http(s)://) in LinkedText. (#32972)

* Disallow links without protocols in LinkedText.

* Update tests
This commit is contained in:
Will Hunt
2026-04-07 07:53:06 +00:00
committed by GitHub
parent 11fd669c26
commit cffd8cfd70
4 changed files with 21 additions and 11 deletions
+1 -7
View File
@@ -14,13 +14,7 @@ test.describe("Topic links", () => {
await use({ roomId });
},
});
for (const link of [
"https://example.org",
"example.org",
"ftp://example.org",
"#aroom:example.org",
"@alice:example.org",
]) {
for (const link of ["https://example.org", "ftp://example.org", "#aroom:example.org", "@alice:example.org"]) {
// Playwright treats '@' as a tag, so replace it to be safe
test(`should linkify plaintext '${link.replace("@", "_@")}'`, async ({ page, user, app, room }) => {
await app.client.sendStateEvent(