mirror of
				https://github.com/acmesh-official/acme.sh
				synced 2025-11-04 13:55:56 +08:00 
			
		
		
		
	Merge pull request #6501 from fuyufjh/patch-1
Fix sed command in telegram notifier
This commit is contained in:
		@@ -34,8 +34,8 @@ telegram_send() {
 | 
			
		||||
  fi
 | 
			
		||||
  _saveaccountconf_mutable TELEGRAM_BOT_URLBASE "$TELEGRAM_BOT_URLBASE"
 | 
			
		||||
 | 
			
		||||
  _subject="$(printf "%s" "$_subject" | sed 's/\\/\\\\\\\\/g' | sed 's/\]/\\\\\]/g' | sed 's/\([_*[()~`>#+--=|{}.!]\)/\\\\\1/g')"
 | 
			
		||||
  _content="$(printf "%s" "$_content" | sed 's/\\/\\\\\\\\/g' | sed 's/\]/\\\\\]/g' | sed 's/\([_*[()~`>#+--=|{}.!]\)/\\\\\1/g')"
 | 
			
		||||
  _subject="$(printf "%s" "$_subject" | sed 's/\\/\\\\\\\\/g' | sed 's/\]/\\\\\]/g' | sed 's/\([_*[()~`>#+\-=|{}.!]\)/\\\\\1/g')"
 | 
			
		||||
  _content="$(printf "%s" "$_content" | sed 's/\\/\\\\\\\\/g' | sed 's/\]/\\\\\]/g' | sed 's/\([_*[()~`>#+\-=|{}.!]\)/\\\\\1/g')"
 | 
			
		||||
  _content="$(printf "*%s*\n%s" "$_subject" "$_content" | _json_encode)"
 | 
			
		||||
  _data="{\"text\": \"$_content\", "
 | 
			
		||||
  _data="$_data\"chat_id\": \"$TELEGRAM_BOT_CHATID\", "
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user