mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01:00
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
This commit is contained in:
parent
8d579218f6
commit
8e42511ad6
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user