Update sed command to support MarkdownV2 properly
This commit is contained in:
@@ -25,7 +25,7 @@ fi
|
|||||||
# Functions for outgoing messages
|
# Functions for outgoing messages
|
||||||
sendmsg(){
|
sendmsg(){
|
||||||
# Escape any special characters first, see https://0x0.st/NO7J.
|
# 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 "$fmt"
|
||||||
}
|
}
|
||||||
sendraw(){
|
sendraw(){
|
||||||
|
Reference in New Issue
Block a user