Support more unnecessary room link percent-encodes

This commit is contained in:
Cadence Ember
2026-08-06 16:28:50 +12:00
parent f42d8a80eb
commit 85b9e4743f
+1 -1
View File
@@ -384,7 +384,7 @@ function linkEndOfMessageSpriteSheet(content) {
*/
async function handleRoomOrMessageLinks(input, di) {
let offset = 0
for (const match of [...input.matchAll(/("?https:\/\/matrix.to\/#\/((?:#|%23|!)[^"/, ?)]+)(?:\/(\$[^"/ ?)]+))?(?:\?[^",:!? )]*?)?)(">|[,<\n )]|$)/g)]) {
for (const match of [...input.matchAll(/("?https:\/\/matrix.to\/#\/((?:#|%23|!|%21)[^"/, ?)]+)(?:\/((?:\$|%24)[^"/ ?)]+))?(?:\?[^",:!? )]*?)?)(">|[,<\n )]|$)/g)]) {
assert(typeof match.index === "number")
let [_, attributeValue, roomID, eventID, endMarker] = match
let result