* yet another parser fix
parent
9b5257313b
commit
6b1dfbf75e
4
tg.sh
4
tg.sh
|
@ -6,7 +6,7 @@ API_URL="https://api.telegram.org"
|
||||||
|
|
||||||
# _escape_text(input_text)
|
# _escape_text(input_text)
|
||||||
function _escape() {
|
function _escape() {
|
||||||
sed -E 's/[`~!@#$%^&*():;<>.,?\|{}=+-_]/\\&/g'
|
sed -E 's/[`~!@#$%^&*():;<>.,?\|{}=+-_]/\\&/g' <<< "$1"
|
||||||
}
|
}
|
||||||
|
|
||||||
# _unescape_text(input_text)
|
# _unescape_text(input_text)
|
||||||
|
@ -17,7 +17,7 @@ function _unescape_text() {
|
||||||
# tg_send(chat, text, file, type, [id])
|
# tg_send(chat, text, file, type, [id])
|
||||||
function tg_send() {
|
function tg_send() {
|
||||||
if [[ $ESCAPE_ALL == true ]]; then
|
if [[ $ESCAPE_ALL == true ]]; then
|
||||||
text="$(_escape <<< "$2")"
|
text="$(_escape "$2")"
|
||||||
else
|
else
|
||||||
text="$2"
|
text="$2"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue