When I use HTML ParseMode, I get the following error "Sending failed: Bad Request: can't parse entities: Unsupported start tag "" at byte offset 53." With markdown2, it works. What do I need to adjust my script to work with HTML mode?
HTML Code:
escapeMarkup: function (str, mode) {
switch (mode) {
case 'markdown':
return str.replace(/([_*\[`])/g, '\\$&');
case 'markdownv2':
return str.replace(/([_*\[\]()~`>#+\-=|{}.!])/g, '\\$&');
default:
return str;
}
},