Index: wp-content/themes/twentytwelve/author.php
===================================================================
--- wp-content/themes/twentytwelve/author.php	(revision 29396)
+++ wp-content/themes/twentytwelve/author.php	(working copy)
@@ -29,7 +29,7 @@
 			?>
 
 			<header class="archive-header">
-				<h1 class="archive-title"><?php printf( __( 'Author Archives: %s', 'twentytwelve' ), '<span class="vcard"><a class="url fn n" href="' . esc_url( get_author_posts_url( get_the_author_meta( "ID" ) ) ) . '" title="' . esc_attr( get_the_author() ) . '" rel="me">' . get_the_author() . '</a></span>' ); ?></h1>
+				<h1 class="archive-title"><?php printf( __( 'Author Archives: %s', 'twentytwelve' ), '<span class="vcard"><a class="url fn n" href="' . esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ) . '" title="' . esc_attr( get_the_author() ) . '" rel="me">' . get_the_author() . '</a></span>' ); ?></h1>
 			</header><!-- .archive-header -->
 
 			<?php
Index: wp-content/themes/twentytwelve/functions.php
===================================================================
--- wp-content/themes/twentytwelve/functions.php	(revision 29396)
+++ wp-content/themes/twentytwelve/functions.php	(working copy)
@@ -279,14 +279,12 @@
 function twentytwelve_content_nav( $html_id ) {
 	global $wp_query;
 
-	$html_id = esc_attr( $html_id );
-
 	if ( $wp_query->max_num_pages > 1 ) : ?>
-		<nav id="<?php echo $html_id; ?>" class="navigation" role="navigation">
+		<nav id="<?php echo esc_attr( $html_id ); ?>" class="navigation" role="navigation">
 			<h3 class="assistive-text"><?php _e( 'Post navigation', 'twentytwelve' ); ?></h3>
 			<div class="nav-previous"><?php next_posts_link( __( '<span class="meta-nav">&larr;</span> Older posts', 'twentytwelve' ) ); ?></div>
 			<div class="nav-next"><?php previous_posts_link( __( 'Newer posts <span class="meta-nav">&rarr;</span>', 'twentytwelve' ) ); ?></div>
-		</nav><!-- #<?php echo $html_id; ?> .navigation -->
+		</nav><!-- .navigation -->
 	<?php endif;
 }
 endif;
Index: wp-content/themes/twentytwelve/header.php
===================================================================
--- wp-content/themes/twentytwelve/header.php	(revision 29396)
+++ wp-content/themes/twentytwelve/header.php	(working copy)
@@ -46,7 +46,7 @@
 		</nav><!-- #site-navigation -->
 
 		<?php if ( get_header_image() ) : ?>
-		<a href="<?php echo esc_url( home_url( '/' ) ); ?>"><img src="<?php header_image(); ?>" class="header-image" width="<?php echo get_custom_header()->width; ?>" height="<?php echo get_custom_header()->height; ?>" alt="" /></a>
+		<a href="<?php echo esc_url( home_url( '/' ) ); ?>"><img src="<?php esc_url( header_image() ); ?>" class="header-image" width="<?php echo esc_attr( get_custom_header()->width ); ?>" height="<?php echo esc_attr( get_custom_header()->height ); ?>" alt="" /></a>
 		<?php endif; ?>
 	</header><!-- #masthead -->
 
Index: wp-content/themes/twentytwelve/image.php
===================================================================
--- wp-content/themes/twentytwelve/image.php	(revision 29396)
+++ wp-content/themes/twentytwelve/image.php	(working copy)
@@ -66,7 +66,7 @@
 		$next_attachment_url = get_attachment_link( $attachments[ $k ]->ID );
 	else :
 		// or get the URL of the first image attachment
-		$next_attachment_url = get_attachment_link( $attachments[ 0 ]->ID );
+		$next_attachment_url = get_attachment_link( $attachments[0]->ID );
 	endif;
 else :
 	// or, if there's only 1 image, get the URL of the image
Index: wp-content/themes/twentytwelve/inc/custom-header.php
===================================================================
--- wp-content/themes/twentytwelve/inc/custom-header.php	(revision 29396)
+++ wp-content/themes/twentytwelve/inc/custom-header.php	(working copy)
@@ -150,16 +150,15 @@
 	?>
 	<div id="headimg">
 		<?php
+		$style = 'color: #' . get_header_textcolor() . ';';
 		if ( ! display_header_text() )
-			$style = ' style="display:none;"';
-		else
-			$style = ' style="color:#' . get_header_textcolor() . ';"';
+			$style = 'display: none;';
 		?>
-		<h1 class="displaying-header-text"><a id="name"<?php echo $style; ?> onclick="return false;" href="<?php echo esc_url( home_url( '/' ) ); ?>"><?php bloginfo( 'name' ); ?></a></h1>
-		<h2 id="desc" class="displaying-header-text"<?php echo $style; ?>><?php bloginfo( 'description' ); ?></h2>
+		<h1 class="displaying-header-text"><a id="name" style="<?php echo esc_attr( $style ); ?>" onclick="return false;" href="<?php echo esc_url( home_url( '/' ) ); ?>"><?php bloginfo( 'name' ); ?></a></h1>
+		<h2 id="desc" class="displaying-header-text" style="<?php echo esc_attr( $style ); ?>"><?php bloginfo( 'description' ); ?></h2>
 		<?php $header_image = get_header_image();
 		if ( ! empty( $header_image ) ) : ?>
-			<img src="<?php echo esc_url( $header_image ); ?>" class="header-image" width="<?php echo get_custom_header()->width; ?>" height="<?php echo get_custom_header()->height; ?>" alt="" />
+			<img src="<?php echo esc_url( $header_image ); ?>" class="header-image" width="<?php echo esc_attr( get_custom_header()->width ); ?>" height="<?php echo esc_attr( get_custom_header()->height ); ?>" alt="" />
 		<?php endif; ?>
 	</div>
 <?php }
\ No newline at end of file
