diff options
Diffstat (limited to 'shell/bin/editor.php')
-rw-r--r-- | shell/bin/editor.php | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/shell/bin/editor.php b/shell/bin/editor.php index 39db3d8..a136cd2 100644 --- a/shell/bin/editor.php +++ b/shell/bin/editor.php @@ -2,7 +2,8 @@ class p_editor extends prog { public static function main($args, $env) { if (isset($_POST['stdin'])) { - if (isset($args[1])) { + if (false) {//if (isset($args[1])) { + echo $args[0].': saving to `'.$args[1]."'\n"; file_put_contents($args[1],$_POST['stdin']); } else { echo $_POST['stdin']; @@ -14,8 +15,8 @@ class p_editor extends prog { $text = ''; } echo '<div class="editor">'; - echo '<input type="hidden" name="stddest" value="'.$_POST['c'].'" />'; - echo '<textarea name="stdin">'.$text.'</textarea>'."\n"; + echo '<input type="hidden" name="stdout_dest" value="'.$_POST['c'].'" />'; + echo '<textarea name="stdin">'.htmlentities($text).'</textarea>'."\n"; echo '<input type="submit" value="save" />'; echo '</div>'; } |