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: https://develop.svn.wordpress.org/trunk@2385 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2005-02-26 06:38:18 +00:00
parent 87bbe3b04f
commit 97c3e10671
1 changed files with 4 additions and 1 deletions

View File

@ -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<option value='$theme_name' $selected>$theme_name</option>";
$theme_name = wp_specialchars($theme_name, true);
echo "\n\t<option value=\"$theme_name\" $selected>$theme_name</option>";
}
?>
</select>