-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Console] Escape exception message during the rendering of an exception #8853
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
For the reccord, here is the output before my patch: (see
|
IIRC, we do have error messages that have some ANSI sequences. |
The only one which can be "interesting" is if (OutputInterface::VERBOSITY_VERBOSE <= $output->getVerbosity()) {
$output->writeln('<comment>Exception trace:</comment>');
// exception related properties
$trace = $e->getTrace(); But it is not ;) |
So, what's the status of this PR? |
IMHO, it's merge-able. |
ok, can you do the same PR on 2.2 and add a test when using a valid tag to prove that it does not mess up those? |
What is a valid tag ? something like |
Everything that is registered as a style on |
This PR was merged into the 2.2 branch. Discussion ---------- [DomCrawler] Added missing docblocks and removed redundant type in a return annotation | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - Commits ------- d414213 [DomCrawler] Added missing docblocks and removed unneeded return annotation.
When the exception message contains some HTML, this display is
broken.
I don't know enought about the differents Output classes.
Maybe we have to check the current Output class before
escaping. But for the moment, we allways format the message
with error tags, so I guess the escape is not an issue.
As this is a bug fix, should I re-open this PR against 2.2 branch ?