diff --git a/wp-admin/theme-editor.php b/wp-admin/theme-editor.php index 2e6000291..f65d91af1 100644 --- a/wp-admin/theme-editor.php +++ b/wp-admin/theme-editor.php @@ -44,13 +44,14 @@ case 'update': } $newcontent = stripslashes($_POST['newcontent']); + $theme = urlencode($theme); if (is_writeable($real_file)) { $f = fopen($real_file, 'w+'); fwrite($f, $newcontent); fclose($f); - header("Location: theme-editor.php?file=$file&a=te"); + header("Location: theme-editor.php?file=$file&theme=$theme&a=te"); } else { - header("Location: theme-editor.php?file=$file"); + header("Location: theme-editor.php?file=$file&theme=$theme"); } exit();