Index: library/Zend/Debug.php =================================================================== --- library/Zend/Debug.php (revision 25030) +++ library/Zend/Debug.php (working copy) @@ -90,7 +90,12 @@ . PHP_EOL; } else { if(!extension_loaded('xdebug')) { - $output = htmlspecialchars($output, ENT_QUOTES); + $flags = ENT_QUOTES; + // PHP 5.4.0+ + if (defined('ENT_SUBSTITUTE')) { + $flags = ENT_QUOTES | ENT_SUBSTITUTE; + } + $output = htmlspecialchars($output, $flags); } $output = '
'