</textarea> in loaded content fix

PHP will now load content into textarea container, but replacing </textarea> with altered tag
This ensures the actual textarea container isn't escpaed early
This replacement is reversed back to the original by the contentCleanup function
This commit is contained in:
Matt Pass
2012-02-03 08:03:19 +00:00
parent 94785e6a3d
commit 3d7980a148

View File

@@ -29,7 +29,7 @@ if ($_GET['action']=="load") {
if ($_SESSION['userLevel'] == 10 || ($_SESSION['userLevel'] < 10 && $bannedFile==false)) {
echo '<script>fileType="text";</script>';
$loadedFile = file_get_contents($file);
echo '<textarea name="loadedFile" id="loadedFile">'.$loadedFile.'</textarea>';
echo '<textarea name="loadedFile" id="loadedFile">'.str_replace("</textarea>","<ICEcoder:/:textarea>",$loadedFile).'</textarea>';
} else {
echo '<script>fileType="nothing";</script>';
echo '<script>alert(\'Sorry, you need a higher admin level to view this file\');</script>';