Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Symfony\Component\Console\Style\SymfonyStyle::ask fails formatting output correctly if last character of $question or $default is an escaped Backslash #19493

Closed
@kalti

Description

@kalti
$io = new SymfonyStyle($input, $output);
$io->ask('question with default value Backslash\\', '\\');

This code snippet will print the following in command line:

 question with default value Backslash</info> [</comment>]:
 > 
  • symfony/console v3.1.3
  • php v7.0.9
  • Mac OSX v10.11.6

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions