From: Manuel Penschuck Date: Mon, 16 Feb 2015 14:44:57 +0000 (+0100) Subject: Decode escaped characters in query string X-Git-Url: https://jspc29.x-matter.uni-frankfurt.de/git/?a=commitdiff_plain;h=db462b871493f63fac94a9724ee844269d5cf013;p=daqtools.git Decode escaped characters in query string --- diff --git a/web/htdocs/cts/cts.pl b/web/htdocs/cts/cts.pl index 23872df..9f35dff 100755 --- a/web/htdocs/cts/cts.pl +++ b/web/htdocs/cts/cts.pl @@ -104,6 +104,12 @@ my $cts = connectToCTS( ); my $query = $ENV{'QUERY_STRING'}; +# escape sequences +while($query =~ /%([0-9a-fA-F]{2,2})/) { + my $chr = chr(hex($1)); + $query=~ s/%$1/$chr/g; +} + if ($query eq "init") { printHeader; print JSON_BIND->new->allow_blessed->convert_blessed->encode({