Skip to content

Commit 3779f3f

Browse files
GuillaumeVerdonnicolas-grekas
authored andcommitted
[Process] Non ASCII characters disappearing during the escapeshellarg
1 parent 3ee1aa0 commit 3779f3f

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/Symfony/Component/Process/ProcessUtils.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public static function escapeArgument($argument)
7171
return $escapedArgument;
7272
}
7373

74-
return escapeshellarg($argument);
74+
return "'".str_replace("'", "'\\''", $argument)."'";
7575
}
7676

7777
/**

src/Symfony/Component/Process/Tests/ProcessUtilsTest.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ public function dataArguments()
4343
array("'<|>\" \"'\\''f'", '<|>" "\'f'),
4444
array("''", ''),
4545
array("'with\\trailingbs\\'", 'with\trailingbs\\'),
46+
array("'withNonAsciiAccentLikeéÉèÈàÀöä'", 'withNonAsciiAccentLikeéÉèÈàÀöä'),
4647
);
4748
}
4849
}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy