web: show UTF8 chars in result stderr_out correctly (from Marius Millea)

This commit is contained in:
David Anderson 2016-02-03 02:35:41 -08:00
parent 22a921d89e
commit b4722fdccd
3 changed files with 17 additions and 3 deletions

View File

@ -49,7 +49,7 @@ if (MYSQLI) {
} else {
$port = null;
}
$mysqli = new mysqli($host, $user, $pass, $dbname, $port);
$mysqli = @new mysqli($host, $user, $pass, $dbname, $port);
return $mysqli;
}
function _mysql_query($q) {

View File

@ -1057,7 +1057,14 @@ function show_result_ops($result) {
row("Priority",$result->priority);
row("XML doc in", "<pre>".htmlspecialchars($result->xml_doc_in)."</pre>");
row("XML doc out", "<pre>".htmlspecialchars($result->xml_doc_out)."</pre>");
row("stderr out", "<pre>".htmlspecialchars($result->stderr_out)."</pre>");
row("stderr out", "<pre>"
.htmlspecialchars(
$result->stderr_out,
ENT_QUOTES | (defined('ENT_SUBSTITUTE')?ENT_SUBSTITUTE:0),
'utf-8'
)
."</pre>"
);
end_table();
echo "
<center>

View File

@ -687,7 +687,14 @@ function show_result($result, $show_outfile_links=false) {
row2(tra("Output files"), $x);
}
end_table();
echo "<h3>".tra("Stderr output")."</h3> <pre>".htmlspecialchars($result->stderr_out)."</pre>";
echo "<h3>".tra("Stderr output")."</h3> <pre>"
.htmlspecialchars(
$result->stderr_out,
ENT_QUOTES | (defined('ENT_SUBSTITUTE')?ENT_SUBSTITUTE:0),
'utf-8'
)
."</pre>"
;
}
function result_navigation($info, $where_clause) {