From 8e42511ad6dd66a18fa2a8bd1a3f0b985f1fe413 Mon Sep 17 00:00:00 2001 From: ryan Date: Sat, 26 Feb 2005 06:38:18 +0000 Subject: [PATCH] Strip slashes from theme name. Encode special chars in theme name. http://mosquito.wordpress.org/view.php?id=978 and http://mosquito.wordpress.org/view.php?id=953 git-svn-id: http://svn.automattic.com/wordpress/trunk@2385 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/theme-editor.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/wp-admin/theme-editor.php b/wp-admin/theme-editor.php index d89376d852..51ca0b29b8 100644 --- a/wp-admin/theme-editor.php +++ b/wp-admin/theme-editor.php @@ -24,6 +24,8 @@ $themes = get_themes(); if (empty($theme)) { $theme = get_current_theme(); +} else { + $theme = stripslashes($theme); } $allowed_files = array_merge($themes[$theme]['Stylesheet Files'], $themes[$theme]['Template Files']); @@ -89,7 +91,8 @@ default: $theme_name = $a_theme['Name']; if ($theme_name == $theme) $selected = " selected='selected'"; else $selected = ''; - echo "\n\t"; + $theme_name = wp_specialchars($theme_name, true); + echo "\n\t"; } ?>