1
0
mirror of https://github.com/maximebf/php-debugbar.git synced 2025-01-16 21:08:34 +01:00

Escape HTML entities

To prevent HTML being showed instead of the tags.

When showing an object with html values, the html was executed instead of shown plain text.
See https://github.com/barryvdh/laravel-debugbar/issues/23
This commit is contained in:
Barry vd. Heuvel 2013-10-27 10:48:46 +01:00
parent 9267c6f64d
commit 27ec65c736

View File

@ -40,6 +40,8 @@ abstract class DataCollector implements DataCollectorInterface
}
} else if (is_object($var)) {
$var = "Object(" . get_class($var) . ")";
}else{
$var = htmlentities($var, ENT_QUOTES, 'UTF-8', false);
}
return $var;
}