BUGFIX #3713 Escape HTTP request URL properly in DebugView::writeError() using htmlentities()

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@85136 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Sean Harvey 2009-08-25 03:11:22 +00:00
parent 5a39ad8a94
commit 87bb1acadb

View File

@ -122,9 +122,10 @@ class DebugView {
*/
public function writeError($httpRequest, $errno, $errstr, $errfile, $errline, $errcontext) {
$errorType = self::$error_types[$errno];
$httpRequestEnt = htmlentities($httpRequest);
echo '<div class="info ' . $errorType['class'] . '">';
echo "<h1>[" . $errorType['title'] . '] ' . strip_tags($errstr) . "</h1>";
echo "<h3>$httpRequest</h3>";
echo "<h3>$httpRequestEnt</h3>";
echo "<p>Line <strong>$errline</strong> in <strong>$errfile</strong></p>";
echo '</div>';
}