Wrapped htmlentities around $loadedFile

Stops conversion of entities such as & to &. Obviously we want it to
be exactly the same as the loaded file and this should ensure that is
the case.
This commit is contained in:
Matt Pass
2012-07-28 13:47:41 +01:00
parent eeffd207be
commit de35d2fe15

View File

@@ -32,7 +32,7 @@ if ($_GET['action']=="load") {
echo "top.ICEcoder.shortURL = '".str_replace($docRoot,"",str_replace("|","/",$file))."';";
echo '</script>';
$loadedFile = file_get_contents($file);
echo '<textarea name="loadedFile" id="loadedFile">'.str_replace("</textarea>","<ICEcoder:/:textarea>",$loadedFile).'</textarea>';
echo '<textarea name="loadedFile" id="loadedFile">'.str_replace("</textarea>","<ICEcoder:/:textarea>",htmlentities($loadedFile)).'</textarea>';
} else {
echo '<script>fileType="nothing";</script>';
echo '<script>top.ICEcoder.message(\'Sorry, you need a higher admin level to view this file\');</script>';