From 9b07987152a2073b5ff19ca8b5b63434963bab0d Mon Sep 17 00:00:00 2001 From: Manoel Vilela Date: Sun, 13 Jul 2025 15:13:22 -0300 Subject: [PATCH 1/2] fix: encode parentheses in shareable links Closes #46 --- web/webapp.lisp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/web/webapp.lisp b/web/webapp.lisp index f526f3a..6368a76 100644 --- a/web/webapp.lisp +++ b/web/webapp.lisp @@ -56,8 +56,16 @@ (defmacro js-share-button-function () " + +// encode paranthesis as well to increase link-parsing compatibility in x.com and other platforms +function strictEncodeURIComponent(str) { + return encodeURIComponent(str) + .replaceAll('(', '%28') + .replaceAll(')', '%29'); +} + var prop = document.getElementById('prop-input').value -var url = window.location.origin + window.location.pathname + '?prop=' + encodeURIComponent(prop); +var url = window.location.origin + window.location.pathname + '?prop=' + strictEncodeURIComponent(prop); var shareUrlInput = document.getElementById('share-url'); shareUrlInput.value = url; shareUrlInput.style.display = 'block'; From 7ffa21b2e88e347ae236ba19888b5a6719c8e17d Mon Sep 17 00:00:00 2001 From: "Manoel V. Machado" Date: Sun, 13 Jul 2025 15:16:40 -0300 Subject: [PATCH 2/2] Update web/webapp.lisp --- web/webapp.lisp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/webapp.lisp b/web/webapp.lisp index 6368a76..0f99714 100644 --- a/web/webapp.lisp +++ b/web/webapp.lisp @@ -57,7 +57,7 @@ (defmacro js-share-button-function () " -// encode paranthesis as well to increase link-parsing compatibility in x.com and other platforms +// encode parentheses as well to increase link-parsing compatibility in x.com and other platforms function strictEncodeURIComponent(str) { return encodeURIComponent(str) .replaceAll('(', '%28')