From a9eb7bcd5753d7d3cbbcfc505c2983c084ee05b7 Mon Sep 17 00:00:00 2001 From: TLSM Date: Tue, 15 Nov 2022 19:28:21 -0500 Subject: [PATCH] Fix submission repost link escaping. --- files/assets/js/submit.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/files/assets/js/submit.js b/files/assets/js/submit.js index bc35d697d..1102578eb 100644 --- a/files/assets/js/submit.js +++ b/files/assets/js/submit.js @@ -182,9 +182,10 @@ function checkRepost() { catch(e) {console.log(e)} if (data && data["permalink"]) { - const permalink = encodeURIComponent(data["permalink"]) - if (permalink) { - system.innerHTML = `This is a repost of ${permalink}`; + const permalinkText = escapeHTML(data["permalink"]); + const permalinkURI = encodeURI(data["permalink"]); + if (permalinkText) { + system.innerHTML = `This is a repost of ${permalinkText}`; } } }