Update sed command to support MarkdownV2 properly

This commit is contained in:
Michael De Roover 2021-01-06 19:41:18 +01:00
parent 05c953f429
commit 8d4e0a1bc6
Signed by: vim
GPG Key ID: 075496E232CE04CB

View File

@ -25,7 +25,7 @@ fi
# Functions for outgoing messages
sendmsg(){
# Escape any special characters first, see https://0x0.st/NO7J.
fmt=$(sed 's/[][~!@#$%^&*()-_=+{}\|;:",<.>/?'"'"']/\\&/g' <<< $1 | sed 's/\t//g')
fmt=$(sed 's/[>#+-=|{}.!]/\\&/g' <<< $1 | sed 's/\t//g')
sendraw "$fmt"
}
sendraw(){