2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-08 01:14:19 +00:00

01_FHEMWEB.pm: fix escape character (Forum #67646)

git-svn-id: https://svn.fhem.de/fhem/trunk@13486 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2017-02-22 11:41:34 +00:00
parent cc228129bd
commit 76f874b3d2

View File

@ -2704,7 +2704,7 @@ FW_longpollInfo($@)
if($fmt && $fmt eq "JSON") {
my @a;
map { my $x = $_; #Forum 57377, ASCII 0-19 \ "
$x=~ s/([\x00-\x19\x22\x5c])/sprintf '\u%04x', ord($1)/ge;
$x=~ s/([\x00-\x1f\x22\x5c\7f])/sprintf '\u%04x', ord($1)/ge;
push @a,$x; } @_;
return '["'.join('","', @a).'"]';
} else {