Sanitize page template class. Props willmot. fixes #11722

git-svn-id: http://svn.automattic.com/wordpress/trunk@12664 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2010-01-08 18:52:16 +00:00
parent 28677c6b00
commit de5cecc69d
1 changed files with 1 additions and 1 deletions

View File

@ -437,7 +437,7 @@ function get_body_class( $class = '' ) {
}
if ( is_page_template() ) {
$classes[] = 'page-template';
$classes[] = 'page-template-' . str_replace( '.php', '-php', get_post_meta( $pageID, '_wp_page_template', true ) );
$classes[] = 'page-template-' . sanitize_html_class( str_replace( '.', '-', get_post_meta( $pageID, '_wp_page_template', true ) ), '' );
}
} elseif ( is_search() ) {
if ( !empty($wp_query->posts) )