From bae4c4159b429d1cbf7ca50ae712af260a515a46 Mon Sep 17 00:00:00 2001 From: hotyue Date: Fri, 24 Jul 2026 06:20:01 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20Telegram=20MarkdownV2=20=E6=B6=88?= =?UTF-8?q?=E6=81=AF=E6=8D=A2=E8=A1=8C=E4=B9=B1=E7=A0=81=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 根因:bash双引号中的 \n 是字面量而非换行符,Telegram MarkdownV2 解析时当作转义序列处理导致排版错乱。 改为实际换行,特殊字符已正确转义。 --- core/install.sh | 8 +++++++- install/ui_menu.sh | 8 +++++++- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/core/install.sh b/core/install.sh index 794471f0..ff2d9c57 100755 --- a/core/install.sh +++ b/core/install.sh @@ -270,7 +270,13 @@ else REG_MSG="#REGISTER#|${REGION_CODE}|${NODE_NAME}|${COMM_IP}|${AGENT_PORT}|${NODE_ALIAS}|${ENABLE_OTA}" echo -e "\n📤 正在向 Telegram 推送注册指令..." - TEXT_MSG="✨ *IP-Sentinel 重新发送注册指令!*\n📍 节点:\`${NODE_ALIAS}\`\n🌐 通讯弹匣:\`${COMM_IP}\`\n🔌 端口:\`${AGENT_PORT}\`\n\n🔑 *请点击下方指令复制并回复给机器人:*\n\`${REG_MSG}\`" + TEXT_MSG="✨ *IP-Sentinel 重新发送注册指令!* +📍 节点:\`${NODE_ALIAS}\` +🌐 通讯弹匣:\`${COMM_IP}\` +🔌 端口:\`${AGENT_PORT}\` + +🔑 *请点击下方指令复制并回复给机器人:* +\`${REG_MSG}\`" # 确定API URL if [ "$TG_TOKEN" == "OFFICIAL_GATEWAY_MODE" ]; then diff --git a/install/ui_menu.sh b/install/ui_menu.sh index 0ea13b88..6cb61d25 100755 --- a/install/ui_menu.sh +++ b/install/ui_menu.sh @@ -129,7 +129,13 @@ do_handle_menu() { REG_MSG="#REGISTER#|${REGION_CODE}|${NODE_NAME}|${COMM_IP}|${AGENT_PORT}|${NODE_ALIAS}|${ENABLE_OTA}" echo -e "\n📤 正在向 Telegram 推送注册指令..." - TEXT_MSG="✨ *IP-Sentinel 重新发送注册指令!*\n📍 节点:\`${NODE_ALIAS}\`\n🌐 通讯弹匣:\`${COMM_IP}\`\n🔌 端口:\`${AGENT_PORT}\`\n\n🔑 *请点击下方指令复制并回复给机器人:*\n\`${REG_MSG}\`" + TEXT_MSG="✨ *IP-Sentinel 重新发送注册指令!* +📍 节点:\`${NODE_ALIAS}\` +🌐 通讯弹匣:\`${COMM_IP}\` +🔌 端口:\`${AGENT_PORT}\` + +🔑 *请点击下方指令复制并回复给机器人:* +\`${REG_MSG}\`" # 确定API URL if [ "$TG_TOKEN" == "OFFICIAL_GATEWAY_MODE" ]; then