File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -27,12 +27,12 @@ telegram_send() {
27
27
fi
28
28
_saveaccountconf_mutable TELEGRAM_BOT_CHATID " $TELEGRAM_BOT_CHATID "
29
29
30
- _subject=" $( printf " %s" " $_subject " | sed ' s/\*/\* \\\\*\* /g' ) "
31
- _content=" $( printf " %s" " $_content " | sed ' s/\([_*`\[ ]\)/\\\\\1/g' ) "
30
+ _subject=" $( printf " %s" " $_subject " | sed ' s/\\/\ \\\\\\\/g ' | sed ' s/\]/\\\\\]/g ' | sed ' s/\([_*[()~`>#+--=|{}.!]\)/\\\\\1 /g' ) "
31
+ _content=" $( printf " %s" " $_content " | sed ' s/\\/\\\\\\\\/g ' | sed ' s/\]/\\\\\]/g ' | sed ' s/\ ([_*[()~`>#+--=|{}.! ]\)/\\\\\1/g' ) "
32
32
_content=" $( printf " *%s*\n%s" " $_subject " " $_content " | _json_encode) "
33
33
_data=" {\" text\" : \" $_content \" , "
34
34
_data=" $_data \" chat_id\" : \" $TELEGRAM_BOT_CHATID \" , "
35
- _data=" $_data \" parse_mode\" : \" markdown \" , "
35
+ _data=" $_data \" parse_mode\" : \" MarkdownV2 \" , "
36
36
_data=" $_data \" disable_web_page_preview\" : \" 1\" }"
37
37
38
38
_debug " $_data "
You can’t perform that action at this time.
0 commit comments