Fix matrix-static URLs for aliases with hashtags

Only the first hashtag was being replaced, which meant that anything after another hashtag wouldn't be sent to the server.
This commit is contained in:
Tulir Asokan 2018-08-29 22:52:22 +03:00 committed by GitHub
parent bc873d937f
commit 457f13840a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -45,7 +45,7 @@ var linkable_clients = [
logo: "img/matrix-static-48px.png", logo: "img/matrix-static-48px.png",
author: "Michael Telatynski", author: "Michael Telatynski",
homepage: "https://github.com/t3chguy/matrix-static", homepage: "https://github.com/t3chguy/matrix-static",
room_url(alias) { return "https://view.matrix.org/alias/" + alias.replace('#', '%23') }, room_url(alias) { return "https://view.matrix.org/alias/" + alias.replace(/#/g, '%23') },
room_id_url(id) { return "https://view.matrix.org/room/" + id }, room_id_url(id) { return "https://view.matrix.org/room/" + id },
maturity: "Stable", maturity: "Stable",
comments: "A static golang generated preview of public world readable Matrix rooms.", comments: "A static golang generated preview of public world readable Matrix rooms.",