Fix parsing encoded matrix.to URL (#660)
authorChuang Zhu <chuang@melty.land>
Mon, 4 Jul 2022 14:20:11 +0000 (22:20 +0800)
committerGitHub <noreply@github.com>
Mon, 4 Jul 2022 14:20:11 +0000 (19:50 +0530)
commita6f21b6606846a92df8d539d0500f87a5664939f
treec0ba7ce3a56b44be6b8727afdac04a80b478bd65
parent06a4e0c93be98244989aac08fcbf7806e448d239
Fix parsing encoded matrix.to URL (#660)

From https://spec.matrix.org/v1.3/appendices/#matrixto-navigation:

The components of the matrix.to URI (<identifier> and <extra parameter>) are to be percent-encoded as per RFC 3986.

Historically, clients have not produced URIs which are fully encoded. Clients should try to interpret these cases to the best of their ability. For example, an unencoded room alias should still work within the client if possible
src/util/sanitize.js