No conv other than base64 to handle binary also

This commit is contained in:
Matt Pass
2016-11-13 22:42:43 +00:00
parent 95b7d0decf
commit 38b4ab79c0

View File

@@ -185,8 +185,8 @@ if (!$demoMode && isset($_SESSION['loggedIn']) && $_SESSION['loggedIn'] && isset
// Only get the file if it exists and begins with our $docRoot
if (file_exists($file) && strpos($file,$docRoot) === 0) {
$loadedFile = toUTF8noBOM(getData($file),true);
echo '<textarea name="loadedFile'.$i.'" id="loadedFile'.$i.'" style="display: none">'.str_replace("</textarea>","<ICEcoder:/:textarea>",str_replace("&","&amp;",$loadedFile)).'</textarea><br><br>'.PHP_EOL.PHP_EOL;
$loadedFile = getData($file);
echo '<textarea name="loadedFile'.$i.'" id="loadedFile'.$i.'" style="display: none">'.base64_encode($loadedFile).'</textarea><br><br>'.PHP_EOL.PHP_EOL;
} else {
die("<script>top.ICEcoder.message('Sorry, that file doesn\'t appear to exist');</script>");
}