Skip to content

Commit

Permalink
Remove use of innerHTML in the_block_template_skip_link().
Browse files Browse the repository at this point in the history
  • Loading branch information
johnbillion committed Feb 17, 2025
1 parent 0754890 commit 025eefe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/wp-includes/theme-templates.php
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ function wp_enqueue_block_template_skip_link() {
skipLink.classList.add( 'skip-link', 'screen-reader-text' );
skipLink.id = 'wp-skip-link';
skipLink.href = '#' + skipLinkTargetID;
skipLink.innerHTML = '<?php /* translators: Hidden accessibility text. */ esc_html_e( 'Skip to content' ); ?>';
skipLink.innerText = '<?php /* translators: Hidden accessibility text. Do not use HTML entities (&nbsp;, etc.). */ esc_html_e( 'Skip to content' ); ?>';

// Inject the skip link.
sibling.parentElement.insertBefore( skipLink, sibling );
Expand Down

0 comments on commit 025eefe

Please sign in to comment.