Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
9486696
Escape translated strings on their way to output
obenland Sep 9, 2026
0acde32
Handbook: Keep the watch link markup out of the translated string
obenland Sep 9, 2026
63648d3
Add translators comments to the strings the batch touches
obenland Sep 9, 2026
d13d6cf
Fix the other findings on the touched lines
obenland Sep 9, 2026
2f57dde
Use curly apostrophes in the strings the batch touches
obenland Sep 9, 2026
f679629
Use wp_kses_post() where the escaped value is markup
obenland Sep 9, 2026
c4c116d
Address review: NSFW titles, two raw arguments, and a lost string
obenland Sep 9, 2026
7b91949
Address review: the exposed count argument and the escaping gaps arou…
obenland Sep 10, 2026
9561bc0
Fix the two lint violations the review fixes introduced.
obenland Sep 10, 2026
554ad10
Address second review: truncated counts, stripped avatar attributes, …
obenland Sep 10, 2026
503929e
Address review: the byline arguments the sweep left unescaped
obenland Sep 10, 2026
c4066ef
Address review: the translators comment the batch made redundant
obenland Sep 10, 2026
a00ebe9
Use curly quotes in the split and merge topic headings
obenland Sep 10, 2026
65350e3
Make the component ticket count heading translatable
obenland Sep 10, 2026
abb78dc
Escape the codex bylines and the showcase excerpt.
obenland Sep 10, 2026
cbc3463
Jobs: Preserve interface links with a dedicated KSES context
obenland Sep 10, 2026
376fa83
Rosetta: Preserve already-escaped showcase excerpts
obenland Sep 10, 2026
5f085b6
bb-base: Keep the avatar attributes in the topic author link
obenland Sep 10, 2026
115577a
Encode flagged status label as a JavaScript string
obenland Sep 10, 2026
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
27 changes: 15 additions & 12 deletions browsehappy.com/public_html/functions.php
Original file line number Diff line number Diff line change
Expand Up @@ -268,21 +268,24 @@ function browsehappy_browser_notice() {
<div id="browser-status" class="wrap">
<?php if ( $results['name'] == 'Internet Explorer' && strpos( $ua, 'Windows NT 5.' ) !== false ) : ?>
<?php if ( $results['insecure'] ) : ?>
<p><?php printf( __( 'It looks like you&#8217;re using an insecure version of %s.', 'browsehappy' ), $results['name'] ); ?>
<?php _e( 'Using an outdated browser makes your computer unsafe.', 'browsehappy' ); ?>
<?php /* translators: %s: Browser name. */ ?>
<p><?php printf( esc_html__( 'It looks like you&#8217;re using an insecure version of %s.', 'browsehappy' ), esc_html( $results['name'] ) ); ?>
<?php esc_html_e( 'Using an outdated browser makes your computer unsafe.', 'browsehappy' ); ?>
<?php else : ?>
<p><?php _e( 'It looks like you&#8217;re using an old version of Internet Explorer.', 'browsehappy' ); ?>
<p><?php esc_html_e( 'It looks like you&#8217;re using an old version of Internet Explorer.', 'browsehappy' ); ?>
<?php endif; ?>
<?php _e( 'On Windows XP, you are unable to update to the latest version. For the best experience on the web, we suggest you try a new browser.', 'browsehappy' ); ?></p>
<?php esc_html_e( 'On Windows XP, you are unable to update to the latest version. For the best experience on the web, we suggest you try a new browser.', 'browsehappy' ); ?></p>
<?php elseif ( $results['insecure'] ) : ?>
<p class="browser-status-text"><?php printf( __( 'It looks like you&#8217;re using an insecure version of %s.', 'browsehappy' ), $results['name'] ); ?>
<?php _e( 'Using an outdated browser makes your computer unsafe.', 'browsehappy' ); ?>
<?php _e( 'For the best experience on the web, please update your browser.', 'browsehappy' ); ?></p>
<p class="browser-status-action"><a href="<?php echo esc_url( $results['update_url'] ); ?>"><?php _e( 'Upgrade now!', 'browsehappy' ); ?></a></p>
<?php /* translators: %s: Browser name. */ ?>
<p class="browser-status-text"><?php printf( esc_html__( 'It looks like you&#8217;re using an insecure version of %s.', 'browsehappy' ), esc_html( $results['name'] ) ); ?>
<?php esc_html_e( 'Using an outdated browser makes your computer unsafe.', 'browsehappy' ); ?>
<?php esc_html_e( 'For the best experience on the web, please update your browser.', 'browsehappy' ); ?></p>
<p class="browser-status-action"><a href="<?php echo esc_url( $results['update_url'] ); ?>"><?php esc_html_e( 'Upgrade now!', 'browsehappy' ); ?></a></p>
<?php else : ?>
<p class="browser-status-text"><?php printf( __( 'Your browser is out of date! It looks like you&#8217;re using an old version of %s.', 'browsehappy' ), $results['name'] ); ?>
<?php _e( 'For the best experience on the web, please update your browser.', 'browsehappy' ); ?></p>
<p class="browser-status-action"><a href="<?php echo esc_url( $results['update_url'] ); ?>"><?php _e( 'Upgrade now!', 'browsehappy' ); ?></a></p>
<?php /* translators: %s: Browser name. */ ?>
<p class="browser-status-text"><?php printf( esc_html__( 'Your browser is out of date! It looks like you&#8217;re using an old version of %s.', 'browsehappy' ), esc_html( $results['name'] ) ); ?>
<?php esc_html_e( 'For the best experience on the web, please update your browser.', 'browsehappy' ); ?></p>
<p class="browser-status-action"><a href="<?php echo esc_url( $results['update_url'] ); ?>"><?php esc_html_e( 'Upgrade now!', 'browsehappy' ); ?></a></p>
<?php endif; ?>
</div>
<?php
Expand All @@ -298,7 +301,7 @@ function browsehappy_locale_notice() {
<div id="i18n-alert">
<p><?php
/* translators: "English" should be translated directly and not to the name of your language. */
printf( __( 'Browse Happy is also available in English. <a href="%s">Click here to change the language to English</a>.', 'browsehappy' ), '/?locale=en' );
printf( wp_kses_post( __( 'Browse Happy is also available in English. <a href="%s">Click here to change the language to English</a>.', 'browsehappy' ) ), '/?locale=en' );
?></p>
</div>
<?php
Expand Down
17 changes: 9 additions & 8 deletions browsehappy.com/public_html/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

<head>
<meta charset="utf-8">
<title><?php _e( 'Browse Happy', 'browsehappy' ); ?></title>
<title><?php esc_html_e( 'Browse Happy', 'browsehappy' ); ?></title>
<meta name="description" content="<?php esc_attr_e( 'Online. Worry-free. Upgrade your browser today!', 'browsehappy' ); ?>" />
<meta name="author" content="WordPress" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
Expand All @@ -34,8 +34,8 @@

<header>
<hgroup class="wrap">
<h1><?php _e( 'Browse <em>Happy</em>', 'browsehappy' ); ?></h1>
<h2><?php _e( 'Online. Worry-free. <em>Upgrade your browser today</em>!', 'browsehappy' ); ?></h2>
<h1><?php echo wp_kses_post( __( 'Browse <em>Happy</em>', 'browsehappy' ) ); ?></h1>
<h2><?php echo wp_kses_post( __( 'Online. Worry-free. <em>Upgrade your browser today</em>!', 'browsehappy' ) ); ?></h2>
</hgroup>
</header>
<?php do_action( 'browsehappy_browser_notice' ); ?>
Expand All @@ -47,8 +47,9 @@
<div class="icon"></div>
<h2 lang="en"><?php echo $data->name; ?></h2>
<p class="info"><?php echo $data->info; ?></p>
<p class="version"><?php printf( __( 'Latest Version: %s', 'browsehappy' ), '<strong>' . apply_filters( 'get_browsehappy_version', $browser ) . '</strong>' ); ?></p>
<p class="website"><?php _e( 'Visit website for more info', 'browsehappy' ); ?></p>
<?php /* translators: %s: Browser version. */ ?>
<p class="version"><?php printf( esc_html__( 'Latest Version: %s', 'browsehappy' ), '<strong>' . esc_html( apply_filters( 'get_browsehappy_version', $browser ) ) . '</strong>' ); ?></p>
<p class="website"><?php esc_html_e( 'Visit website for more info', 'browsehappy' ); ?></p>
</a>
<?php do_action( 'browsehappy_browser_after', $browser ); ?>
</li><!-- #<?php echo $browser; ?> -->
Expand All @@ -59,12 +60,12 @@
<footer>
<div class="wrap">
<section id="about">
<h2><?php _e( 'What is Browse Happy?', 'browsehappy' ); ?></h2>
<h2><?php esc_html_e( 'What is Browse Happy?', 'browsehappy' ); ?></h2>
<p><?php $what = __( 'Using an outdated browser makes your computer unsafe. Browse Happy is a way for you to find out what are the latest versions of the major browsers around. You can also learn about alternative browsers that may fit you even better than the one you are currently using.', 'browsehappy' );
echo $what; ?></p>
</section><!-- #about -->
<section id="share">
<h2><?php _e( 'Share the Happiness', 'browsehappy' ); ?></h2>
<h2><?php esc_html_e( 'Share the Happiness', 'browsehappy' ); ?></h2>
<nav>
<ul>
<li class="tumblr">
Expand Down Expand Up @@ -105,7 +106,7 @@
</nav>
</section><!-- #share -->
<div id="byline">
<a href="<?php echo esc_url( __( 'https://wordpress.org/', 'browsehappy' ) ); ?>" title="WordPress"><?php printf( __( 'Brought to you by %s', 'browsehappy' ), '<strong>WordPress</strong>' ); ?></a>
<a href="<?php echo esc_url( __( 'https://wordpress.org/', 'browsehappy' ) ); ?>" title="WordPress"><?php printf( /* translators: %s: WordPress, in bold. */ esc_html__( 'Brought to you by %s', 'browsehappy' ), '<strong>WordPress</strong>' ); ?></a>
</div><!-- #byline -->
</div>
</footer>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php get_header(); ?>

<h2 id="post-home"><?php _e( 'Support', 'bborg' ); ?></h2>
<h2 id="post-home"><?php esc_html_e( 'Support', 'bborg' ); ?></h2>

<?php if ( 1 === bbp_get_paged() ) : // cached first page ?>

Expand Down
11 changes: 6 additions & 5 deletions buddypress.org/public_html/wp-content/themes/bb-base/archive.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@
<h2 id="post-<?php the_ID(); ?>"><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h2>
<cite>
<?php
/* translators: 1: post date, 2: post author */
printf( __( 'Published on %1$s by %2$s', 'bborg' ),
get_the_time( 'F jS, Y' ),
get_the_author_link()
printf(
/* translators: 1: Publication date, 2: Author link. */
esc_html__( 'Published on %1$s by %2$s', 'bborg' ),
esc_html( get_the_time( 'F jS, Y' ) ),
wp_kses_post( get_the_author_link() )
);
?>
</cite>
Expand All @@ -25,7 +26,7 @@
'before_page_number' => '<span class="screen-reader-text">' . __( 'Page', 'bborg' ) . ' </span>',
) );
else : ?>
<p><em><?php _e( 'Sorry, no posts matched your criteria.', 'bborg' ); ?></em></p>
<p><em><?php esc_html_e( 'Sorry, no posts matched your criteria.', 'bborg' ); ?></em></p>
<?php endif; ?>
<hr class="hidden" />
<?php
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
<?php
/**
* Notice shown when a forum search has no terms.
*
* @package bbPress
*/

?>
<div class="bbp-template-notice">
<p><?php _e( 'Please enter some search terms above', 'bbpress' ); ?></p>
<p><?php esc_html_e( 'Please enter some search terms above', 'bbpress' ); ?></p>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -21,25 +21,26 @@

<fieldset class="bbp-form">

<legend><?php printf( __( 'Merge topic "%s"', 'bbpress' ), bbp_get_topic_title() ); ?></legend>
<?php /* translators: %s: Topic title. */ ?>
<legend><?php printf( esc_html__( 'Merge topic "%s"', 'bbpress' ), esc_html( bbp_get_topic_title() ) ); ?></legend>

<div>

<div class="bbp-template-notice info">
<p><?php _e( 'Select the topic to merge this one into. The destination topic will remain the lead topic, and this one will change into a reply.', 'bbpress' ); ?></p>
<p><?php _e( 'To keep this topic as the lead, go to the other topic and use the merge tool from there instead.', 'bbpress' ); ?></p>
<p><?php esc_html_e( 'Select the topic to merge this one into. The destination topic will remain the lead topic, and this one will change into a reply.', 'bbpress' ); ?></p>
<p><?php esc_html_e( 'To keep this topic as the lead, go to the other topic and use the merge tool from there instead.', 'bbpress' ); ?></p>
</div>

<div class="bbp-template-notice">
<p><?php _e( 'All replies within both the topics will be merged chronologically. The order of the merged replies is based on the time they were posted. If the destination topic was created after this one, its post date will be updated to a second earlier than this one.', 'bbpress' ); ?></p>
<p><?php esc_html_e( 'All replies within both the topics will be merged chronologically. The order of the merged replies is based on the time they were posted. If the destination topic was created after this one, its post date will be updated to a second earlier than this one.', 'bbpress' ); ?></p>
</div>

<fieldset class="bbp-form">
<legend><?php _e( 'Destination', 'bbpress' ); ?></legend>
<legend><?php esc_html_e( 'Destination', 'bbpress' ); ?></legend>
<div>
<?php if ( bbp_has_topics( array( 'show_stickies' => false, 'post_parent' => bbp_get_topic_forum_id( bbp_get_topic_id() ), 'post__not_in' => array( bbp_get_topic_id() ) ) ) ) : ?>

<label for="bbp_destination_topic"><?php _e( 'Merge with this topic:', 'bbpress' ); ?></label>
<label for="bbp_destination_topic"><?php esc_html_e( 'Merge with this topic:', 'bbpress' ); ?></label>

<?php
bbp_dropdown( array(
Expand All @@ -57,44 +58,44 @@

<?php else : ?>

<label><?php _e( 'There are no other topics in this forum to merge with.', 'bbpress' ); ?></label>
<label><?php esc_html_e( 'There are no other topics in this forum to merge with.', 'bbpress' ); ?></label>

<?php endif; ?>

</div>
</fieldset>

<fieldset class="bbp-form">
<legend><?php _e( 'Topic Extras', 'bbpress' ); ?></legend>
<legend><?php esc_html_e( 'Topic Extras', 'bbpress' ); ?></legend>

<div>

<?php if ( bbp_is_subscriptions_active() ) : ?>

<input name="bbp_topic_subscribers" id="bbp_topic_subscribers" type="checkbox" value="1" checked="checked" />
<label for="bbp_topic_subscribers"><?php _e( 'Merge topic subscribers', 'bbpress' ); ?></label><br />
<label for="bbp_topic_subscribers"><?php esc_html_e( 'Merge topic subscribers', 'bbpress' ); ?></label><br />

<?php endif; ?>

<input name="bbp_topic_favoriters" id="bbp_topic_favoriters" type="checkbox" value="1" checked="checked" />
<label for="bbp_topic_favoriters"><?php _e( 'Merge topic favoriters', 'bbpress' ); ?></label><br />
<label for="bbp_topic_favoriters"><?php esc_html_e( 'Merge topic favoriters', 'bbpress' ); ?></label><br />

<?php if ( bbp_allow_topic_tags() ) : ?>

<input name="bbp_topic_tags" id="bbp_topic_tags" type="checkbox" value="1" checked="checked" />
<label for="bbp_topic_tags"><?php _e( 'Merge topic tags', 'bbpress' ); ?></label><br />
<label for="bbp_topic_tags"><?php esc_html_e( 'Merge topic tags', 'bbpress' ); ?></label><br />

<?php endif; ?>

</div>
</fieldset>

<div class="bbp-template-notice error">
<p><?php _e( '<strong>WARNING:</strong> This process cannot be undone.', 'bbpress' ); ?></p>
<p><?php echo wp_kses_post( __( '<strong>WARNING:</strong> This process cannot be undone.', 'bbpress' ) ); ?></p>
</div>

<div class="bbp-submit-wrapper">
<button type="submit" id="bbp_merge_topic_submit" name="bbp_merge_topic_submit" class="button submit"><?php _e( 'Submit', 'bbpress' ); ?></button>
<button type="submit" id="bbp_merge_topic_submit" name="bbp_merge_topic_submit" class="button submit"><?php esc_html_e( 'Submit', 'bbpress' ); ?></button>
</div>
</div>

Expand All @@ -107,7 +108,7 @@
<?php else : ?>

<div id="no-topic-<?php bbp_topic_id(); ?>" class="bbp-no-topic">
<div class="entry-content"><?php is_user_logged_in() ? _e( 'You do not have the permissions to edit this topic!', 'bbpress' ) : _e( 'You cannot edit this topic.', 'bbpress' ); ?></div>
<div class="entry-content"><?php is_user_logged_in() ? esc_html_e( 'You do not have the permissions to edit this topic!', 'bbpress' ) : esc_html_e( 'You cannot edit this topic.', 'bbpress' ); ?></div>
</div>

<?php endif; ?>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,32 +21,34 @@

<fieldset class="bbp-form">

<legend><?php printf( __( 'Split topic "%s"', 'bbpress' ), bbp_get_topic_title() ); ?></legend>
<?php /* translators: %s: Topic title. */ ?>
<legend><?php printf( esc_html__( 'Split topic "%s"', 'bbpress' ), esc_html( bbp_get_topic_title() ) ); ?></legend>

<div>

<div class="bbp-template-notice info">
<p><?php _e( 'When you split a topic, you are slicing it in half starting with the reply you just selected. Choose to use that reply as a new topic with a new title, or merge those replies into an existing topic.', 'bbpress' ); ?></p>
<p><?php esc_html_e( 'When you split a topic, you are slicing it in half starting with the reply you just selected. Choose to use that reply as a new topic with a new title, or merge those replies into an existing topic.', 'bbpress' ); ?></p>
</div>

<div class="bbp-template-notice">
<p><?php _e( 'If you use the existing topic option, replies within both topics will be merged chronologically. The order of the merged replies is based on the time and date they were posted.', 'bbpress' ); ?></p>
<p><?php esc_html_e( 'If you use the existing topic option, replies within both topics will be merged chronologically. The order of the merged replies is based on the time and date they were posted.', 'bbpress' ); ?></p>
</div>

<fieldset class="bbp-form">
<legend><?php _e( 'Split Method', 'bbpress' ); ?></legend>
<legend><?php esc_html_e( 'Split Method', 'bbpress' ); ?></legend>

<div>
<input name="bbp_topic_split_option" id="bbp_topic_split_option_reply" type="radio" checked="checked" value="reply" />
<label for="bbp_topic_split_option_reply"><?php printf( __( 'New topic in <strong>%s</strong> titled:', 'bbpress' ), bbp_get_forum_title( bbp_get_topic_forum_id( bbp_get_topic_id() ) ) ); ?></label>
<?php /* translators: %s: Forum title. */ ?>
<label for="bbp_topic_split_option_reply"><?php printf( wp_kses_post( __( 'New topic in <strong>%s</strong> titled:', 'bbpress' ) ), esc_html( bbp_get_forum_title( bbp_get_topic_forum_id( bbp_get_topic_id() ) ) ) ); ?></label>
<input type="text" id="bbp_topic_split_destination_title" value="<?php echo esc_attr( sprintf( __( 'Split: %s', 'bbpress' ), bbp_get_topic_title() ) ); ?>" size="35" name="bbp_topic_split_destination_title" />
</div>

<?php if ( bbp_has_topics( array( 'show_stickies' => false, 'post_parent' => bbp_get_topic_forum_id( bbp_get_topic_id() ), 'post__not_in' => array( bbp_get_topic_id() ) ) ) ) : ?>

<div>
<input name="bbp_topic_split_option" id="bbp_topic_split_option_existing" type="radio" value="existing" />
<label for="bbp_topic_split_option_existing"><?php _e( 'Use an existing topic in this forum:', 'bbpress' ); ?></label>
<label for="bbp_topic_split_option_existing"><?php esc_html_e( 'Use an existing topic in this forum:', 'bbpress' ); ?></label>

<?php
bbp_dropdown( array(
Expand All @@ -68,36 +70,36 @@
</fieldset>

<fieldset class="bbp-form">
<legend><?php _e( 'Topic Extras', 'bbpress' ); ?></legend>
<legend><?php esc_html_e( 'Topic Extras', 'bbpress' ); ?></legend>

<div>

<?php if ( bbp_is_subscriptions_active() ) : ?>

<input name="bbp_topic_subscribers" id="bbp_topic_subscribers" type="checkbox" value="1" checked="checked" />
<label for="bbp_topic_subscribers"><?php _e( 'Copy subscribers to the new topic', 'bbpress' ); ?></label><br />
<label for="bbp_topic_subscribers"><?php esc_html_e( 'Copy subscribers to the new topic', 'bbpress' ); ?></label><br />

<?php endif; ?>

<input name="bbp_topic_favoriters" id="bbp_topic_favoriters" type="checkbox" value="1" checked="checked" />
<label for="bbp_topic_favoriters"><?php _e( 'Copy favoriters to the new topic', 'bbpress' ); ?></label><br />
<label for="bbp_topic_favoriters"><?php esc_html_e( 'Copy favoriters to the new topic', 'bbpress' ); ?></label><br />

<?php if ( bbp_allow_topic_tags() ) : ?>

<input name="bbp_topic_tags" id="bbp_topic_tags" type="checkbox" value="1" checked="checked" />
<label for="bbp_topic_tags"><?php _e( 'Copy topic tags to the new topic', 'bbpress' ); ?></label><br />
<label for="bbp_topic_tags"><?php esc_html_e( 'Copy topic tags to the new topic', 'bbpress' ); ?></label><br />

<?php endif; ?>

</div>
</fieldset>

<div class="bbp-template-notice error">
<p><?php _e( '<strong>WARNING:</strong> This process cannot be undone.', 'bbpress' ); ?></p>
<p><?php echo wp_kses_post( __( '<strong>WARNING:</strong> This process cannot be undone.', 'bbpress' ) ); ?></p>
</div>

<div class="bbp-submit-wrapper">
<button type="submit" id="bbp_merge_topic_submit" name="bbp_merge_topic_submit" class="button submit"><?php _e( 'Submit', 'bbpress' ); ?></button>
<button type="submit" id="bbp_merge_topic_submit" name="bbp_merge_topic_submit" class="button submit"><?php esc_html_e( 'Submit', 'bbpress' ); ?></button>
</div>
</div>

Expand All @@ -110,7 +112,7 @@
<?php else : ?>

<div id="no-topic-<?php bbp_topic_id(); ?>" class="bbp-no-topic">
<div class="entry-content"><?php is_user_logged_in() ? _e( 'You do not have the permissions to edit this topic!', 'bbpress' ) : _e( 'You cannot edit this topic.', 'bbpress' ); ?></div>
<div class="entry-content"><?php is_user_logged_in() ? esc_html_e( 'You do not have the permissions to edit this topic!', 'bbpress' ) : esc_html_e( 'You cannot edit this topic.', 'bbpress' ); ?></div>
</div>

<?php endif; ?>
Expand Down
Loading