include date in XML

This commit is contained in:
vv01f 2020-09-27 15:31:43 +02:00
parent 30450cfbfb
commit b60c51f97e
Signed by untrusted user who does not match committer: vv01f
GPG Key ID: 02625A16AC1D1FF6
1 changed files with 6 additions and 2 deletions

View File

@ -1,5 +1,6 @@
function escape(s='') {
return s.replace(/&/g, "&")
function escape(s) {
return s.toString()
.replace(/&/g, "&")
.replace(/</g, "&lt;")
.replace(/>/g, "&gt;");
}
@ -53,6 +54,9 @@ $('.membership-form').each(function() {
var note = getText('note');
if (note) xml += ' <note>' + escape(note) + '</note>\n';
var dtg = getText('date');
if (dtg) xml += ' <date>' + escape(date) + '</date>\n';
xml +=
'</member>';
// console.log('xml: ' + xml);