URL Encode info

This commit is contained in:
Steven Tracey 2023-12-19 09:29:32 -06:00
parent c1c6c16678
commit e4c4bbaad7

2
app.js
View File

@ -21,7 +21,7 @@ function generateQuickCmd() {
fetch("https://paste.nevets.tech/api/", {
method: "POST",
headers: {'Content-Type': 'application/json'},
body: "{'format':'url','content':'" + buildCmd() + "','expires':3600,'lexer':'bash'}",
body: "{'format':'url','content':'" + encodeURIComponent(buildCmd()) + "','expires':3600,'lexer':'bash'}",
mode: "cors"
}).then(res => res.json().then(json => {
document.getElementById("script").innerText = "curl -s " + json.url + "/raw | bash";