Shorten NUL byte

This commit is contained in:
Jakub Vrana 2012-09-18 10:41:25 -07:00
parent 9a30f14797
commit 2264e09021
2 changed files with 6 additions and 2 deletions

View file

@ -9,7 +9,7 @@ header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
if ($_GET["file"] == "favicon.ico") {
header("Content-Type: image/x-icon");
echo compile_file('../adminer/static/favicon.ico');
echo base64_decode(compile_file('../adminer/static/favicon.ico', 'base64_encode'));
} elseif ($_GET["file"] == "default.css") {
header("Content-Type: text/css; charset=utf-8");
echo lzw_decompress(compile_file('../adminer/static/default.css', 'minify_css'));

View file

@ -9,7 +9,11 @@ function add_apo_slashes($s) {
}
function add_quo_slashes($s) {
return addcslashes($s, "\n\r\$\0\"\\");
$return = $s;
$return = addcslashes($return, "\n\r\$\"\\");
$return = preg_replace('~\0(?![0-7])~', '\\\\0', $return);
$return = addcslashes($return, "\0");
return $return;
}
function remove_lang($match) {