Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[Console] Escape question text and default value in SymfonyStyle::ask()#19961
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
chalasr commentedSep 18, 2016
| Q | A |
|---|---|
| Branch? | 2.7 |
| Bug fix? | yes |
| New feature? | no |
| BC breaks? | no |
| Deprecations? | no |
| Tests pass? | yes |
| Fixed tickets | #19493 |
| License | MIT |
| Doc PR | n/a |
ad76f98 to84779a1Comparero0NL commentedSep 18, 2016 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
This needs to be done on a per case basis? Ie. edit: considerhttps://github.com/chalasr/symfony/blob/84779a1b4cde11a83ec6c542ccad2e419d4e3c47/src/Symfony/Component/Console/Question/Question.php#L55 vs.https://github.com/chalasr/symfony/blob/84779a1b4cde11a83ec6c542ccad2e419d4e3c47/src/Symfony/Component/Console/Formatter/OutputFormatter.php#L28 |
| $text =OutputFormatter::escape($question->getQuestion()); | ||
| $default =$question->getDefault(); | ||
| if (null !==$default) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Needs to be skipped forConfirmationQuestion, else bool is converted to a string.
d3c1d69 tof37bbbdComparechalasr commentedSep 18, 2016
I made the change, refactoring a bit btw so we stop duplications. |
ro0NL commentedSep 18, 2016
Yeah.. i would say revert and escape where needed. |
f37bbbd toeed3cc5Comparechalasr commentedSep 18, 2016
Reverted. |
fabpot commentedOct 5, 2016
Thank you@chalasr. |
…yStyle::ask() (chalasr)This PR was merged into the 2.7 branch.Discussion----------[Console] Escape question text and default value in SymfonyStyle::ask()| Q | A| ------------- | ---| Branch? | 2.7| Bug fix? | yes| New feature? | no| BC breaks? | no| Deprecations? | no| Tests pass? | yes| Fixed tickets |#19493| License | MIT| Doc PR | n/aCommits-------eed3cc5 [Console] Escape default value and question in SymfonyStyle::ask()