We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents e8345e1 + 4f64f71 commit 5987f1cCopy full SHA for 5987f1c
event_dispatcher.rst
@@ -41,6 +41,9 @@ The most common way to listen to an event is to register an **event listener**::
41
// Customize your response object to display the exception details
42
$response = new Response();
43
$response->setContent($message);
44
+ // the exception message can contain unfiltered user input;
45
+ // set the content-type to text to avoid XSS issues
46
+ $response->headers->set('Content-Type', 'text/plain; charset=utf-8');
47
48
// HttpExceptionInterface is a special type of exception that
49
// holds status code and header details
0 commit comments