From 0b2f04d131686a921c06fa8fcd2080a9c2c2e551 Mon Sep 17 00:00:00 2001 From: Yarmo Mackenbach Date: Fri, 11 Sep 2020 18:12:20 +0200 Subject: [PATCH] Fix handling of Twitter URLs with parameters --- static/scripts.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/scripts.js b/static/scripts.js index f410441..d7f0188 100644 --- a/static/scripts.js +++ b/static/scripts.js @@ -491,7 +491,7 @@ async function verifyProof(url, fingerprint) { // Twitter if (/^https:\/\/twitter.com/.test(url)) { output.type = "twitter"; - match = url.match(/https:\/\/twitter\.com\/(.*)\/status\/(.*)/); + match = url.match(/https:\/\/twitter\.com\/(.*)\/status\/([0-9]*)(?:\?.*)?/); output.display = `@${match[1]}`; output.url = `https://twitter.com/${match[1]}`; output.proofUrlFetch = `/server/verify/twitter