fix(powershell): double-quote escape (#2828)

This commit is contained in:
qgarnier 2021-05-25 14:54:12 +02:00 committed by GitHub
parent c077ad700a
commit e8beda2186
1 changed files with 1 additions and 1 deletions

View File

@ -29,7 +29,7 @@ sub escape_jsonstring {
my $ps = q{ my $ps = q{
function Escape-JSONString($str) { function Escape-JSONString($str) {
if ($str -eq $null) {return ""} 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; return $str;
} }
}; };