mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
BUGFIX Consistently using multibyte-safe htmlentities()
This commit is contained in:
parent
1fec67e5af
commit
3a7ac9759a
@ -173,7 +173,7 @@ class SS_Backtrace {
|
||||
}
|
||||
$result .= "<li><b>" . htmlentities($name, ENT_COMPAT, 'UTF-8') . "</b>\n<br />\n";
|
||||
$result .= isset($item['line']) ? "Line $item[line] of " : '';
|
||||
$result .= isset($item['file']) ? htmlentities(basename($item['file'])) : '';
|
||||
$result .= isset($item['file']) ? htmlentities(basename($item['file']), ENT_COMPAT, 'UTF-8') : '';
|
||||
$result .= "</li>\n";
|
||||
}
|
||||
}
|
||||
|
@ -141,7 +141,7 @@ class Debug {
|
||||
$val = '(bool) ' . $val;
|
||||
} else {
|
||||
if(!Director::is_cli() && !Director::is_ajax()) {
|
||||
$val = "<pre style=\"font-family: Courier new\">" . htmlentities($val) . "</pre>\n";
|
||||
$val = "<pre style=\"font-family: Courier new\">" . htmlentities($val, ENT_COMPAT, 'UTF-8') . "</pre>\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -126,7 +126,7 @@ class DebugView extends Object {
|
||||
*/
|
||||
public function writeError($httpRequest, $errno, $errstr, $errfile, $errline, $errcontext) {
|
||||
$errorType = self::$error_types[$errno];
|
||||
$httpRequestEnt = htmlentities($httpRequest);
|
||||
$httpRequestEnt = htmlentities($httpRequest, ENT_COMPAT, 'UTF-8');
|
||||
echo '<div class="info ' . $errorType['class'] . '">';
|
||||
echo "<h1>[" . $errorType['title'] . '] ' . strip_tags($errstr) . "</h1>";
|
||||
echo "<h3>$httpRequestEnt</h3>";
|
||||
|
@ -469,7 +469,7 @@ class InstallRequirements {
|
||||
if($this->errors) {
|
||||
echo "<p>The following problems are preventing me from installing SilverStripe CMS:</p>\n\n";
|
||||
foreach($this->errors as $error) {
|
||||
echo "<li>" . htmlentities(implode(", ", $error)) . "</li>\n";
|
||||
echo "<li>" . htmlentities(implode(", ", $error), ENT_COMPAT, 'UTF-8') . "</li>\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -480,7 +480,7 @@ class InstallRequirements {
|
||||
$id = strtolower(str_replace(' ', '_', $section));
|
||||
echo "<table id=\"{$id}_results\" class=\"testResults\" width=\"100%\">";
|
||||
foreach($tests as $test => $result) {
|
||||
echo "<tr class=\"$result[0]\"><td>$test</td><td>" . nl2br(htmlentities($result[1])) . "</td></tr>";
|
||||
echo "<tr class=\"$result[0]\"><td>$test</td><td>" . nl2br(htmlentities($result[1]), ENT_COMPAT, 'UTF-8') . "</td></tr>";
|
||||
}
|
||||
echo "</table>";
|
||||
|
||||
@ -502,7 +502,7 @@ class InstallRequirements {
|
||||
break;
|
||||
}
|
||||
}
|
||||
$output .= "<tr class=\"$result[0]\"><td>$test</td><td>" . nl2br(htmlentities($result[1])) . "</td></tr>";
|
||||
$output .= "<tr class=\"$result[0]\"><td>$test</td><td>" . nl2br(htmlentities($result[1], ENT_COMPAT, 'UTF-8')) . "</td></tr>";
|
||||
}
|
||||
$className = "good";
|
||||
$text = "All Requirements Pass";
|
||||
|
Loading…
Reference in New Issue
Block a user