Make WordPress Core

Changeset 12664


Ignore:
Timestamp:
01/08/2010 06:52:16 PM (16 years ago)
Author:
ryan
Message:

Sanitize page template class. Props willmot. fixes #11722

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/post-template.php

    r12601 r12664  
    438438        if ( is_page_template() ) {
    439439            $classes[] = 'page-template';
    440             $classes[] = 'page-template-' . str_replace( '.php', '-php', get_post_meta( $pageID, '_wp_page_template', true ) );
     440            $classes[] = 'page-template-' . sanitize_html_class( str_replace( '.', '-', get_post_meta( $pageID, '_wp_page_template', true ) ), '' );
    441441        }
    442442    } elseif ( is_search() ) {
Note: See TracChangeset for help on using the changeset viewer.