fixed links to posts with & in their name not working
Some checks failed
Restart Website Service / restart_service (push) Has been cancelled
Some checks failed
Restart Website Service / restart_service (push) Has been cancelled
This commit is contained in:
parent
2f2e494994
commit
e7e8787e03
|
@ -69,7 +69,7 @@
|
||||||
p.innerHTML = "Recent <a href=\"/posts\">posts</a>";
|
p.innerHTML = "Recent <a href=\"/posts\">posts</a>";
|
||||||
|
|
||||||
let elem = document.querySelector("#content>.content.posts>ul");
|
let elem = document.querySelector("#content>.content.posts>ul");
|
||||||
elem.innerHTML = posts.slice(0, 3).map(x => `<li><a href="/posts?post=${x}">${x}</a></li>`).join("\n");
|
elem.innerHTML = posts.slice(0, 3).map(x => `<li><a href="/posts?post=${encodeURI(x).replace(/&/, "%26")}">${x}</a></li>`).join("\n");
|
||||||
elem.style.maxWidth = "40ch";
|
elem.style.maxWidth = "40ch";
|
||||||
elem.classList.add("posts");
|
elem.classList.add("posts");
|
||||||
})()
|
})()
|
||||||
|
|
Loading…
Reference in a new issue