diff --git a/src/server/tools/general.js b/src/server/tools/general.js
index 7ab4fa5..277c954 100755
--- a/src/server/tools/general.js
+++ b/src/server/tools/general.js
@@ -4532,6 +4532,24 @@ module.exports = {
}
},
+ convertHTMLTagsToText(input) {
+ const tagMap = {
+ "
": "",
+ "": "1. ",
+ "- ": "\n- ",
+ "
": "",
+ "": "",
+ "": ""
+ };
+
+ // Replace supported HTML tags with their corresponding text representations
+ let output = input.replace(/||- |<\/ul>|<\/ol>|<\/li>/g, (match) => {
+ return tagMap[match];
+ });
+
+ return output;
+ },
+
async getAnnuncioForTelegram(myrec, tablerec, mydescr, userorig, nuovo) {
try {
@@ -4614,7 +4632,9 @@ module.exports = {
if (cat)
out += this.addRowTelegram('⭐️', 'Categoria', cat, true);
- let descrcontent = this.firstchars(this.removeLastSpaceAndACapo(myrec.note), 175, true, url);
+ let note = this.convertHTMLTagsToText(myrec.note)
+
+ let descrcontent = this.firstchars(this.removeLastSpaceAndACapo(note), 175, true, url);
if (descrcontent)
out += this.addRowTelegram('📝', 'Descrizione ' + newdescr, descrcontent, true);