Update sed command to support MarkdownV2 properly
This commit is contained in:
parent
05c953f429
commit
8d4e0a1bc6
@ -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(){
|
||||
|
Loading…
x
Reference in New Issue
Block a user