Iscrizione Conacreis e Arcadei

This commit is contained in:
paoloar77
2022-10-29 12:37:50 +02:00
parent 663eb34cfa
commit 3b5d138d5d
11 changed files with 461 additions and 18 deletions

View File

@@ -1211,7 +1211,7 @@ module.exports = {
} catch (e) {
console.error('sendNotificationByCircuit: ', e);
return {ris: null, inviato: false} ;
return {ris: null, inviato: false};
}
},
@@ -1317,20 +1317,24 @@ module.exports = {
},
ConvertHTMLToPlainText(strHTML) {
return strHTML.replace(/<[^>]+>/g, '');
if (strHTML)
return strHTML.replace(/<[^>]+>/g, '');
return '';
},
convertHTMLtoText(myhtml) {
let msg = myhtml;
msg = msg.replace('&quot;', '"');
msg = msg.replace(/<strong>/g, '');
msg = msg.replace(/<\/strong>/g, '');
msg = msg.replace(/<em>/g, '');
msg = msg.replace(/<\/em>/g, '');
msg = msg.replace('&gt;', '>');
msg = msg.replace('&lt;', '<');
msg = msg.replace('&amp;', '&');
msg = msg.replace('<br>', '\n');
if (msg) {
msg = msg.replace('&quot;', '"');
msg = msg.replace(/<strong>/g, '');
msg = msg.replace(/<\/strong>/g, '');
msg = msg.replace(/<em>/g, '');
msg = msg.replace(/<\/em>/g, '');
msg = msg.replace('&gt;', '>');
msg = msg.replace('&lt;', '<');
msg = msg.replace('&amp;', '&');
msg = msg.replace('<br>', '\n');
}
return msg;
},