From cbee7641dddbaeb6e31ff897d9c437d66f2886af Mon Sep 17 00:00:00 2001 From: G2-Games Date: Thu, 24 Oct 2024 10:17:14 -0500 Subject: [PATCH] URI encode links for copying --- web/request.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/web/request.js b/web/request.js index 8f4315c..5f1073c 100644 --- a/web/request.js +++ b/web/request.js @@ -62,7 +62,9 @@ function makeFinished(progressBar, progressText, linkRow, linkAddress, hash) { let button = linkRow.appendChild(document.createElement("button")); button.textContent = "📝"; button.addEventListener('click', function(e) { - navigator.clipboard.writeText("https://" + window.location.host + "/" + linkAddress) + navigator.clipboard.writeText( + encodeURI("https://" + window.location.host + "/" + linkAddress) + ) }) progressBar.style.display = "none";