Skip to content

Commit a4352e5

Browse files
committed
fix quote escaping
1 parent 6cc0f03 commit a4352e5

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

psCommandService.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -357,6 +357,9 @@ PSCommandService.prototype._finalizeParameterValue = function(valueToSet, applyQ
357357
PSCommandService.prototype._sanitize = function(toSanitize) {
358358
toSanitize.replace(/(\n)/g, "\\$1"); // escape newlines
359359

360-
// escape stuff that could screw up variables, or break quoting
361-
return toSanitize.replace(/(['`#])/g, "`$1");
360+
// escape stuff that could screw up variables
361+
toSanitize = toSanitize.replace(/([`#])/g, "`$1");
362+
363+
// fix quote breaking
364+
return toSanitize.replace(/(['])/g, "'$1")
362365
}

0 commit comments

Comments
 (0)