-
Problem report
-
Resolution: Duplicate
-
Major
-
None
-
5.0.30, 6.0.12, 6.2.6, 6.4.0beta5
Steps to reproduce:
- Send message in telegram with symbols <>
Result:
If this is a real problem i can offer my solution
Add case 'html'
escapeMarkup: function (str, mode) { switch (mode) { case 'markdown': return str.replace(/([_*\[`])/g, '\\$&'); case 'markdownv2': return str.replace(/([_*\[\]()~`>#+\-=|{}.!])/g, '\\$&'); case 'html': return str.replace(/&/g, '&').replace(/"/g, '"').replace(/'/g, ''').replace(/</g, '<').replace(/>/g, '>'); } },
and add 'html' in list parsmode
if (['markdown', 'markdownv2', 'html'].indexOf(params.ParseMode) !== -1) { Telegram.message = Telegram.escapeMarkup(Telegram.message, params.ParseMode); }
- duplicates
-
ZBX-23244 Telegram webhook can't pass "<" so bot can parse it correctly
- Closed