* yet another parser fix

master
Dominika Liberda 2022-04-03 18:05:38 +02:00
parent 9b5257313b
commit 6b1dfbf75e
1 changed files with 2 additions and 2 deletions

4
tg.sh
View File

@ -6,7 +6,7 @@ API_URL="https://api.telegram.org"
# _escape_text(input_text)
function _escape() {
sed -E 's/[`~!@#$%^&*():;<>.,?\|{}=+-_]/\\&/g'
sed -E 's/[`~!@#$%^&*():;<>.,?\|{}=+-_]/\\&/g' <<< "$1"
}
# _unescape_text(input_text)
@ -17,7 +17,7 @@ function _unescape_text() {
# tg_send(chat, text, file, type, [id])
function tg_send() {
if [[ $ESCAPE_ALL == true ]]; then
text="$(_escape <<< "$2")"
text="$(_escape "$2")"
else
text="$2"
fi