From 457f13840ab839e48b5a388304fbade796a05686 Mon Sep 17 00:00:00 2001 From: Tulir Asokan Date: Wed, 29 Aug 2018 22:52:22 +0300 Subject: [PATCH] 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. --- src/components/HomePage.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/HomePage.js b/src/components/HomePage.js index 2e0f037..f0dec83 100644 --- a/src/components/HomePage.js +++ b/src/components/HomePage.js @@ -45,7 +45,7 @@ var linkable_clients = [ logo: "img/matrix-static-48px.png", author: "Michael Telatynski", 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 }, maturity: "Stable", comments: "A static golang generated preview of public world readable Matrix rooms.",