Fix submission repost link escaping.

remotes/1693176582716663532/tmp_refs/heads/watchparty
Snakes 2022-11-15 19:28:21 -05:00
parent 0706dc633a
commit a9eb7bcd57
Signed by: Snakes
GPG Key ID: E745A82778055C7E
1 changed files with 4 additions and 3 deletions

View File

@ -182,9 +182,10 @@ function checkRepost() {
catch(e) {console.log(e)}
if (data && data["permalink"]) {
const permalink = encodeURIComponent(data["permalink"])
if (permalink) {
system.innerHTML = `<span class="text-danger">This is a repost of <a href="${permalink}">${permalink}</a></span>`;
const permalinkText = escapeHTML(data["permalink"]);
const permalinkURI = encodeURI(data["permalink"]);
if (permalinkText) {
system.innerHTML = `<span class="text-danger">This is a repost of <a href="${permalinkURI}">${permalinkText}</a></span>`;
}
}
}