From 31fdd30c137ce6bdb9cc40e61fc0fc9b15bc138f Mon Sep 17 00:00:00 2001 From: zarzet Date: Thu, 22 Jan 2026 04:24:34 +0700 Subject: [PATCH] fix: use --data-urlencode for Telegram message to handle special chars (+, &) --- .github/workflows/release.yml | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 301225e..90f4dee 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -507,11 +507,13 @@ jobs: MESSAGE=$(cat /tmp/telegram_message.txt) # Send message first (using HTML parse mode) + # Use --data-urlencode for proper encoding of special chars (+, &, etc.) + # Use || true to ensure file uploads continue even if message fails curl -s -X POST "https://api.telegram.org/bot${TELEGRAM_BOT_TOKEN}/sendMessage" \ - -d chat_id="${TELEGRAM_CHANNEL_ID}" \ - -d text="${MESSAGE}" \ - -d parse_mode="HTML" \ - -d disable_web_page_preview="true" + --data-urlencode "chat_id=${TELEGRAM_CHANNEL_ID}" \ + --data-urlencode "text=${MESSAGE}" \ + --data-urlencode "parse_mode=HTML" \ + --data-urlencode "disable_web_page_preview=true" || true # Upload arm64 APK to channel if [ -f "$ARM64_APK" ]; then