-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
QuestionHelper autocomplete with trailing backslashes triggers display error #24652
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
Labels
Comments
Additional info from some playing with the prompt. Initial prompt looks good: Typing a match causes the broken display, note trailing Hitting tab to complete: |
kamazee
pushed a commit
to kamazee/symfony
that referenced
this issue
Oct 22, 2017
Fixes symfony#24652 Trailing backslash, being unescaped, used to escape closing formatting tag and, thus, formatting tag appeared in autocompletion
kamazee
pushed a commit
to kamazee/symfony
that referenced
this issue
Oct 22, 2017
Fixes symfony#24652 Trailing backslash, being unescaped, used to escape closing formatting tag and, thus, formatting tag appeared in autocompletion
kamazee
added a commit
to kamazee/symfony
that referenced
this issue
Oct 22, 2017
Fixes symfony#24652 Trailing backslash, being unescaped, used to escape closing formatting tag and, thus, formatting tag appeared in autocompletion
kamazee
added a commit
to kamazee/symfony
that referenced
this issue
Oct 22, 2017
Fixes symfony#24652 Trailing backslash, being unescaped, used to escape closing formatting tag and, thus, formatting tag appeared in autocompletion
kamazee
added a commit
to kamazee/symfony
that referenced
this issue
Oct 22, 2017
Fixes symfony#24652 Trailing backslash, being unescaped, used to escape closing formatting tag and, thus, formatting tag appeared in autocompletion
nicolas-grekas
added a commit
that referenced
this issue
Oct 24, 2017
This PR was merged into the 2.7 branch. Discussion ---------- Escape trailing \ in QuestionHelper autocompletion | Q | A | ------------- | --- | Branch? | 2.7 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #24652 | License | MIT Fixes #24652 Trailing backslash, being unescaped, used to escape closing formatting tag and, thus, formatting tag appeared in autocompletion Output of the added test without the fix: ``` ./phpunit --filter testAutocompleteWithTrailingBackslash src/Symfony/Component/Console/Tests/Helper/QuestionHelperTest.php #!/usr/bin/env php PHPUnit 6.0.13 by Sebastian Bergmann and contributors. Testing Symfony\Component\Console\Tests\Helper\QuestionHelperTest F 1 / 1 (100%) Time: 4.28 seconds, Memory: 6.00MB There was 1 failure: 1) Symfony\Component\Console\Tests\Helper\QuestionHelperTest::testAutocompleteWithTrailingBackslash Failed asserting that two strings are equal. --- Expected +++ Actual @@ @@ -'ExampleNamespace\' +'ExampleNamespace</hl>' ``` `OutputFormatter::escapeTrailingBackslash` is marked as `@internal`; however, this seems to be a valid use without exposing outside of the component. `OutputFormatter::escape`, which is not internal, doesn't fit here because escaping tags in autocompletion options is a deeper topic: there might be a valid use for tags in autocompletion and even if not, taking out the possibility to use them might be considered a BC break (even though it hasn't been advertised anywhere). Commits ------- 0c0f1da Escape trailing \ in QuestionHelper autocompletion
symfony-splitter
pushed a commit
to symfony/console
that referenced
this issue
Oct 24, 2017
Fixes symfony/symfony#24652 Trailing backslash, being unescaped, used to escape closing formatting tag and, thus, formatting tag appeared in autocompletion
Fixed in #24660 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Providing trailing backslashes in an autocomplete value seems to break the console formatting, when using QuestionHelper. I assume this is a result of faulty escaping around the highlighting:
The text was updated successfully, but these errors were encountered: