-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
chalasr
commented
Sep 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
to
84779a1
Compare
This needs to be done on a per case basis? Ie. edit: consider https://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 |
$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 for ConfirmationQuestion
, else bool is converted to a string.
d3c1d69
to
f37bbbd
Compare
I made the change, refactoring a bit btw so we stop duplications. |
Yeah.. i would say revert and escape where needed. |
f37bbbd
to
eed3cc5
Compare
Reverted. |
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/a Commits ------- eed3cc5 [Console] Escape default value and question in SymfonyStyle::ask()