Skip to content

Commit d078874

Browse files
Apply suggestions from code review
1 parent 13e86d4 commit d078874

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

src/PowerShellEditorServices/Utility/ArgumentUtils.cs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright (c) Microsoft Corporation.
2+
// Licensed under the MIT License.
3+
14
using System.Text;
25
using System.Management.Automation.Language;
36

@@ -6,11 +9,11 @@ namespace Microsoft.PowerShell.EditorServices.Utility
69
internal static class ArgumentEscaping
710
{
811
/// <summary>
9-
/// Escape a powershell argument while still making it evaluatable in AddScript.
12+
/// Escape a PowerShell argument while still making it able to be evaluated in AddScript.
1013
///
11-
/// NOTE: This does not "santize" parameters, e.g. a pipe in one argument might affect another argument.
14+
/// NOTE: This does not "sanitize" parameters, e.g., a pipe in one argument might affect another argument.
1215
/// This is intentional to give flexibility to specifying arguments.
13-
/// It also does not try to fix invalid PowerShell syntax, e.g. a single quote in a string literal.
16+
/// It also does not try to fix invalid PowerShell syntax, e.g., a single quote in a string literal.
1417
/// </summary>
1518
public static string Escape(string Arg)
1619
{

test/PowerShellEditorServices.Test/Utility/ArgumentEscapingTests.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// Copyright (c) Microsoft Corporation.
2+
// Licensed under the MIT License.
3+
14
using Xunit;
25
using Microsoft.PowerShell.EditorServices.Utility;
36
using System.IO;

0 commit comments

Comments
 (0)