Make WordPress Core

Changeset 22999


Ignore:
Timestamp:
12/03/2012 08:12:22 PM (13 years ago)
Author:
lancewillett
Message:

Twenty Twelve: escape navigation ID output, props nacin. See #22690.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-content/themes/twentytwelve/functions.php

    r22614 r22999  
    241241 * @since Twenty Twelve 1.0
    242242 */
    243 function twentytwelve_content_nav( $nav_id ) {
     243function twentytwelve_content_nav( $html_id ) {
    244244    global $wp_query;
    245245
     246    $html_id = esc_attr( $html_id );
     247
    246248    if ( $wp_query->max_num_pages > 1 ) : ?>
    247         <nav id="<?php echo $nav_id; ?>" class="navigation" role="navigation">
     249        <nav id="<?php echo $html_id; ?>" class="navigation" role="navigation">
    248250            <h3 class="assistive-text"><?php _e( 'Post navigation', 'twentytwelve' ); ?></h3>
    249251            <div class="nav-previous alignleft"><?php next_posts_link( __( '<span class="meta-nav">&larr;</span> Older posts', 'twentytwelve' ) ); ?></div>
    250252            <div class="nav-next alignright"><?php previous_posts_link( __( 'Newer posts <span class="meta-nav">&rarr;</span>', 'twentytwelve' ) ); ?></div>
    251         </nav><!-- #<?php echo $nav_id; ?> .navigation -->
     253        </nav><!-- #<?php echo $html_id; ?> .navigation -->
    252254    <?php endif;
    253255}
Note: See TracChangeset for help on using the changeset viewer.