=================================================================== RCS file: /cvs/cvs/draft/form.min.js,v retrieving revision 1.98 retrieving revision 1.101 diff -u -p -r1.98 -r1.101 --- draft/form.min.js 2024/03/31 17:14:06 1.98 +++ draft/form.min.js 2024/04/02 07:14:55 1.101 @@ -1,7 +1,8 @@ const form = document.querySelector("#cform"); function parseString(str) { - return str.replace(/[~`!@#$%^&*(){}\[\];:"'<,.>?\/\\|+=-]/g, '_'); +// return str.replace(/[~`!@#$%^&*(){}\[\];:"'<,.>?\/\\|+=-]/g, '_'); + return str.replace(/[~]/g, '_'); } function parseMail(email) { @@ -63,9 +64,7 @@ async function sendData() { }, callback: function(token) { const data = JSON.stringify({"add": mail, "sub": subj, "msg": mess, "tok": token}); - turnstile.remove(); - info.textContent+="Sending..."; -// console.log(data); + info.textContent="Sending..."; fetch("/feedbk/", { headers: { "Content-Type": "application/json" }, credentials: "same-origin", @@ -74,7 +73,8 @@ async function sendData() { body: data }) .then(response => response.json()) - .then(json => info.textContent=parseString(json['msg'])) + .then(json => info.textContent=json['msg']) + .then(turnstile.remove()); } }); });