fix powershell json backslash (#2529)

This commit is contained in:
qgarnier 2021-01-19 14:55:57 +01:00 committed by GitHub
parent dc3773ebc6
commit 2901ccafb6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -29,7 +29,7 @@ sub escape_jsonstring {
my $ps = q{
function Escape-JSONString($str) {
if ($str -eq $null) {return ""}
$str = $str.ToString().Replace('"','\"').Replace('\','\\').Replace("`n",'\n').Replace("`r",'\r').Replace("`t",'\t')
$str = $str.ToString().Replace('"','\"').Replace('\\','\\\\').Replace("`n",'\n').Replace("`r",'\r').Replace("`t",'\t')
return $str;
}
};