From 06522080ebdbeabb82ab575135a07380d90a888c Mon Sep 17 00:00:00 2001 From: yequari Date: Mon, 9 Oct 2023 20:34:10 -0700 Subject: [PATCH] fix webmention.js --- themes/saturn/static/js/webmention.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/saturn/static/js/webmention.js b/themes/saturn/static/js/webmention.js index 4ff8287..eceaab2 100644 --- a/themes/saturn/static/js/webmention.js +++ b/themes/saturn/static/js/webmention.js @@ -392,7 +392,7 @@ A more detailed example: let apiURL = `https://webmention.io/api/mentions.jf2?per-page=${maxWebmentions}&sort-by=${sortBy}&sort-dir=${sortDir}`; pages.forEach(function (path) { - apiURL += `&target[]=${encodeURIComponent('http:' + path)}&target[]=${encodeURIComponent('https:' + path)}&target[]=${encodeURIComponent('https:' + path.endsWith('/') ? path.slice(0, -1) : str)}`; + apiURL += `&target[]=${encodeURIComponent('http:' + path)}&target[]=${encodeURIComponent('https:' + path)}&target[]=${encodeURIComponent('https:' + path.replace(/\/$/, ""))}`; }); /** @type {WebmentionResponse} */