loadedFile to replace all & chars for textarea

This is so & becomes & ...what you draw out of the textarea
is then &
In turn this allows all HTML entities of this style to work and as we
aren't using PHP's htmlentities(), we don't end with junk chars on
slanted apostrophes, degree symbols etc.
This commit is contained in:
Matt Pass
2013-02-08 10:12:35 +00:00
parent 246bf189b5
commit 336ef01dee

View File

@@ -28,7 +28,7 @@ if ($_GET['action']=="load") {
echo 'top.ICEcoder.shortURL = top.ICEcoder.rightClickedFile = top.ICEcoder.thisFileFolderLink = "'.$fileLoc."/".$fileName.'";';
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>",str_replace("&","&amp;",$loadedFile)).'</textarea>';
} else if (strpos(finfo_file($finfo, $file),"image")===0) {
echo '<script>fileType="image";fileName=\''.$fileLoc."/".$fileName.'\'</script>';
} else {