mirror of
https://github.com/maximebf/php-debugbar.git
synced 2025-07-26 03:01:23 +02:00
Escape lines
This commit is contained in:
@@ -75,6 +75,9 @@ class ExceptionsCollector extends DataCollector implements Renderable
|
|||||||
$lines = file($e->getFile());
|
$lines = file($e->getFile());
|
||||||
$start = $e->getLine() - 4;
|
$start = $e->getLine() - 4;
|
||||||
$lines = array_slice($lines, $start < 0 ? 0 : $start, 7);
|
$lines = array_slice($lines, $start < 0 ? 0 : $start, 7);
|
||||||
|
foreach($lines as &$line){
|
||||||
|
$line = htmlentities($line, ENT_QUOTES, 'UTF-8', false);
|
||||||
|
}
|
||||||
|
|
||||||
return array(
|
return array(
|
||||||
'type' => get_class($e),
|
'type' => get_class($e),
|
||||||
|
Reference in New Issue
Block a user