forked from mirror/_s
Escape the value of get_the_title() when printed in an attribute.
This commit is contained in:
parent
f0c910f5e2
commit
d64b796669
|
@ -7,6 +7,8 @@
|
|||
*/
|
||||
|
||||
get_header();
|
||||
|
||||
remove_filter( 'the_title', 'wptexturize' );
|
||||
?>
|
||||
|
||||
<div id="primary" class="content-area image-attachment">
|
||||
|
@ -21,13 +23,14 @@ get_header();
|
|||
<div class="entry-meta">
|
||||
<?php
|
||||
$metadata = wp_get_attachment_metadata();
|
||||
printf( __( 'Published <span class="entry-date"><time class="entry-date" datetime="%1$s">%2$s</time></span> at <a href="%3$s" title="Link to full-size image">%4$s × %5$s</a> in <a href="%6$s" title="Return to %7$s" rel="gallery">%7$s</a>', '_s' ),
|
||||
printf( __( 'Published <span class="entry-date"><time class="entry-date" datetime="%1$s">%2$s</time></span> at <a href="%3$s" title="Link to full-size image">%4$s × %5$s</a> in <a href="%6$s" title="Return to %7$s" rel="gallery">%8$s</a>', '_s' ),
|
||||
esc_attr( get_the_date( 'c' ) ),
|
||||
esc_html( get_the_date() ),
|
||||
wp_get_attachment_url(),
|
||||
$metadata['width'],
|
||||
$metadata['height'],
|
||||
get_permalink( $post->post_parent ),
|
||||
esc_attr( get_the_title( $post->post_parent ) ),
|
||||
get_the_title( $post->post_parent )
|
||||
);
|
||||
?>
|
||||
|
|
Reference in New Issue