Twenty Seventeen: Use esc_attr_e() for translatable strings in HTML attributes.

Props bor0.
Fixes #40216.

Merges [40311] to the 4.7 branch.


git-svn-id: https://develop.svn.wordpress.org/branches/4.7@40374 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Pascal Birchler 2017-04-04 06:39:15 +00:00
parent 9bf0436c67
commit 7abacb8516
2 changed files with 2 additions and 2 deletions

View File

@ -22,7 +22,7 @@
get_template_part( 'template-parts/footer/footer', 'widgets' ); get_template_part( 'template-parts/footer/footer', 'widgets' );
if ( has_nav_menu( 'social' ) ) : ?> if ( has_nav_menu( 'social' ) ) : ?>
<nav class="social-navigation" role="navigation" aria-label="<?php _e( 'Footer Social Links Menu', 'twentyseventeen' ); ?>"> <nav class="social-navigation" role="navigation" aria-label="<?php esc_attr_e( 'Footer Social Links Menu', 'twentyseventeen' ); ?>">
<?php <?php
wp_nav_menu( array( wp_nav_menu( array(
'theme_location' => 'social', 'theme_location' => 'social',

View File

@ -9,7 +9,7 @@
*/ */
?> ?>
<nav id="site-navigation" class="main-navigation" role="navigation" aria-label="<?php _e( 'Top Menu', 'twentyseventeen' ); ?>"> <nav id="site-navigation" class="main-navigation" role="navigation" aria-label="<?php esc_attr_e( 'Top Menu', 'twentyseventeen' ); ?>">
<button class="menu-toggle" aria-controls="top-menu" aria-expanded="false"><?php echo twentyseventeen_get_svg( array( 'icon' => 'bars' ) ); echo twentyseventeen_get_svg( array( 'icon' => 'close' ) ); _e( 'Menu', 'twentyseventeen' ); ?></button> <button class="menu-toggle" aria-controls="top-menu" aria-expanded="false"><?php echo twentyseventeen_get_svg( array( 'icon' => 'bars' ) ); echo twentyseventeen_get_svg( array( 'icon' => 'close' ) ); _e( 'Menu', 'twentyseventeen' ); ?></button>
<?php wp_nav_menu( array( <?php wp_nav_menu( array(
'theme_location' => 'top', 'theme_location' => 'top',