Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions main.php
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ function check_main( $theme_slug ) {
}

if ( empty( $theme['Template Version'] ) ) {
echo '<p>' . __( 'Child theme does not have the <strong>Template Version</strong> tag in style.css.', 'theme-check' ) . '</p>';
echo '<p>' . wp_kses_post( __( 'Child theme does not have the <strong>Template Version</strong> tag in style.css.', 'theme-check' ) ) . '</p>';
} elseif ( $theme['Template Version'] < $parent_theme['Version'] ) {
echo '<p>';
printf(
Expand All @@ -97,9 +97,9 @@ function check_main( $theme_slug ) {
$results = display_themechecks();

if ( ! $success ) {
echo '<h2>' . sprintf( __( 'One or more errors were found for %1$s.', 'theme-check' ), esc_html( $theme['Title'] ) ) . '</h2>';
echo '<h2>' . esc_html( sprintf( __( 'One or more errors were found for %1$s.', 'theme-check' ), $theme['Title'] ) ) . '</h2>';
} else {
echo '<h2>' . sprintf( __( '%1$s passed the tests', 'theme-check' ), esc_html( $theme['Title'] ) ) . '</h2>';
echo '<h2>' . esc_html( sprintf( __( '%1$s passed the tests', 'theme-check' ), $theme['Title'] ) ) . '</h2>';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi
It would be better to escape the translated text and the value with esc_html__() inside sprintf().

tc_success();
}

Expand Down