Skip to content

Commit 57f00b6

Browse files
committed
[Console] do not encode backslashes in console default description
1 parent ed9c6ca commit 57f00b6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Descriptor/TextDescriptor.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -187,10 +187,10 @@ protected function describeApplication(Application $application, array $options
187187
private function formatDefaultValue($default)
188188
{
189189
if (PHP_VERSION_ID < 50400) {
190-
return str_replace('\/', '/', json_encode($default));
190+
return str_replace(array('\/', '\\\\'), array('/', '\\'), json_encode($default));
191191
}
192192

193-
return json_encode($default, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);
193+
return str_replace('\\\\', '\\', json_encode($default, JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE));
194194
}
195195

196196
/**

0 commit comments

Comments
 (0)