From 77ffbabf22b95b6ee724e2ab7462cdc67e4b5d8f Mon Sep 17 00:00:00 2001 From: "Kay Marquardt (Gnadelwartz)" Date: Wed, 10 Feb 2021 21:30:42 +0100 Subject: [PATCH] unescape: keep \uxxx UTF-8 encoding --- bashbot.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bashbot.sh b/bashbot.sh index 4b28dd2..3633fd4 100755 --- a/bashbot.sh +++ b/bashbot.sh @@ -30,7 +30,7 @@ BOTCOMMANDS="-h help init start stop status suspendback resumeback killb # 8 - curl/wget missing # 10 - not bash! # -#### $$VERSION$$ v1.45-dev-24-g785e769 +#### $$VERSION$$ v1.45-dev-26-g82a57a7 ################################################################## # are we running in a terminal? @@ -106,8 +106,8 @@ JsonEscape(){ } # clean \ from escaped json string # $1 string, output cleaned string -cleanEscaped(){ # remove " all \ but \n \n or \r - sed -E -e 's/\\"/+/g' -e 's/\\([^n])/\1/g' -e 's/(\r|\n)//g' <<<"$1" +cleanEscaped(){ # remove " all \ but \n\u \n or \r + sed -E -e 's/\\"/+/g' -e 's/\\([^nu])/\1/g' -e 's/(\r|\n)//g' <<<"$1" } # check if $1 seems a valid token # return true if token seems to be valid