Because you’re using variables that use SPECIAL characters. e.g . , * / & % $
And Telegram can’t differ from a Markdown SPECIAL character.
So these non-Markdown Characters have to be escaped using a /
e.g., /(
or /*
or /,
since you can’t do this, because you’re using variables, you have two ways to fix this. Either use HTML Markdown or use Better Logic Library and add a custom function for escaping
Like this one and use it like this: {[escapeRegex(variable)]}
function escapeRegex(string) {
return string.replace(/[/\-\\^$*+?.()|[\]{}]/g, '\\$&');
}