Make WordPress Core


Ignore:
Timestamp:
12/10/2011 07:18:51 PM (14 years ago)
Author:
ryan
Message:

More consistent attribute escaping. Props nacin.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-content/themes/twentyten/loop-attachment.php

    r18189 r19582  
    1919
    2020                <?php if ( ! empty( $post->post_parent ) ) : ?>
    21                     <p class="page-title"><a href="<?php echo get_permalink( $post->post_parent ); ?>" title="<?php esc_attr( printf( __( 'Return to %s', 'twentyten' ), get_the_title( $post->post_parent ) ) ); ?>" rel="gallery"><?php
     21                    <p class="page-title"><a href="<?php echo get_permalink( $post->post_parent ); ?>" title="<?php echo esc_attr( sprintf( __( 'Return to %s', 'twentyten' ), strip_tags( get_the_title( $post->post_parent ) ) ) ); ?>" rel="gallery"><?php
    2222                        /* translators: %s - title of parent post */
    2323                        printf( __( '<span class="meta-nav">&larr;</span> %s', 'twentyten' ), get_the_title( $post->post_parent ) );
     
    3434                                sprintf( '<span class="author vcard"><a class="url fn n" href="%1$s" title="%2$s" rel="author">%3$s</a></span>',
    3535                                    get_author_posts_url( get_the_author_meta( 'ID' ) ),
    36                                     sprintf( esc_attr__( 'View all posts by %s', 'twentyten' ), get_the_author() ),
     36                                    esc_attr( sprintf( __( 'View all posts by %s', 'twentyten' ), get_the_author() ) ),
    3737                                    get_the_author()
    3838                                )
     
    8686    }
    8787?>
    88                         <p class="attachment"><a href="<?php echo $next_attachment_url; ?>" title="<?php echo esc_attr( get_the_title() ); ?>" rel="attachment"><?php
     88                        <p class="attachment"><a href="<?php echo $next_attachment_url; ?>" title="<?php the_title_attribute(); ?>" rel="attachment"><?php
    8989                            $attachment_width  = apply_filters( 'twentyten_attachment_size', 900 );
    9090                            $attachment_height = apply_filters( 'twentyten_attachment_height', 900 );
     
    9797                        </div><!-- #nav-below -->
    9898<?php else : ?>
    99                         <a href="<?php echo wp_get_attachment_url(); ?>" title="<?php echo esc_attr( get_the_title() ); ?>" rel="attachment"><?php echo basename( get_permalink() ); ?></a>
     99                        <a href="<?php echo wp_get_attachment_url(); ?>" title="<?php the_title_attribute(); ?>" rel="attachment"><?php echo basename( get_permalink() ); ?></a>
    100100<?php endif; ?>
    101101                        </div><!-- .entry-attachment -->
Note: See TracChangeset for help on using the changeset viewer.