Files
MTProxyMax/mtproxymax.sh
SamNet-dev 65ad3c8999 Fix Telegram messages: expand literal \n to real newlines before sending
In bash, \n in double-quoted strings is literal backslash+n, not a
newline character. curl --data-urlencode sends them as %5Cn and
Telegram renders them literally in message text, causing \n\n to
appear visibly around proxy links.

Fix: run msg through printf '%b' in telegram_send_message() and
tg_send() to convert \n to actual newlines (0x0A) before the string
is URL-encoded and sent to the Telegram API.

Validated: _esc() markdown escapes (\_,  \*) are unaffected since
underscore and asterisk are not printf escape sequences.
2026-02-17 13:38:53 -06:00

217 KiB