From 46ded0789b3519179be91914826f5bcabb4e81a4 Mon Sep 17 00:00:00 2001 From: Jensfrank Date: Thu, 27 Jun 2024 11:51:19 +0800 Subject: [PATCH] Update nodeloc_vps_autotest_ip.sh --- nodeloc_vps_autotest_ip.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/nodeloc_vps_autotest_ip.sh b/nodeloc_vps_autotest_ip.sh index 2b47c64..8fffc9c 100644 --- a/nodeloc_vps_autotest_ip.sh +++ b/nodeloc_vps_autotest_ip.sh @@ -161,12 +161,11 @@ format_results() { # 转义特殊字符 escaped_result=$(echo "$ip_quality_result" | sed 's/\\/\\\\/g; s/`/\\`/g; s/\$/\\$/g; s/\*/\\*/g; s/_/\\_/g') - # 使用 heredoc 并保持转义 - cat << 'EOF' | sed "s/ESCAPED_RESULT/$escaped_result/" | iconv -f UTF-8 -t UTF-8//IGNORE > results.md + cat << EOF | iconv -f UTF-8 -t UTF-8//IGNORE > results.md [tabs] [tab="IP质量"] \`\`\` -ESCAPED_RESULT +$escaped_result \`\`\` [/tab] [/tabs]