damus.io

damus.io website
git clone git://jb55.com/damus.io
Log | Files | Refs | README

commit 347c6617fee0fb61a62dbcd9ce6cc4b0f8783966
parent 4dc129236162459a5ce4c13af5d676a092bb98bc
Author: William Casarin <jb55@jb55.com>
Date:   Fri, 11 Nov 2022 12:18:25 -0800

web: fix url regex

Diffstat:
Mweb/damus.js | 2+-
Mweb/index.html | 4++--
2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/web/damus.js b/web/damus.js @@ -1200,7 +1200,7 @@ function is_video_url(path) { return VID_REGEX.test(path) } -const URL_REGEX = /(https?:\/\/[^\s\):]+)/g; +const URL_REGEX = /(https?:\/\/[^\s]+)[,:)]?(\w|$)/g; function linkify(text, show_media) { return text.replace(URL_REGEX, function(url) { const parsed = new URL(url) diff --git a/web/index.html b/web/index.html @@ -6,7 +6,7 @@ <title>Damus</title> - <link rel="stylesheet" href="damus.css?v=20"> + <link rel="stylesheet" href="damus.css?v=21"> </head> <body> <section class="header"> @@ -41,7 +41,7 @@ <script src="noble-secp256k1.js?v=1"></script> <script src="bech32.js?v=1"></script> <script src="nostr.js?v=6"></script> - <script src="damus.js?v=57"></script> + <script src="damus.js?v=58"></script> <script> // I have to delay loading to wait for nos2x const relay = setTimeout(damus_web_init, 100)