From 9486696480bce836961109ec6fc1c9dd8b0f1983 Mon Sep 17 00:00:00 2001 From: Konstantin Obenland Date: Wed, 9 Sep 2026 16:25:08 -0500 Subject: [PATCH 01/19] Escape translated strings on their way to output Rewrites the _e(), _ex(), __(), _x(), _n() and _nx() calls the EscapeOutput sniff flags across the sites. Plain strings go through esc_html_e() and esc_html__(), or the esc_attr variants inside attributes; plural calls are wrapped in esc_html(); strings that carry markup are wrapped in wp_kses_post(), so no translation string changes. One string printed into a JavaScript literal uses esc_js(). Call spacing and missing statement semicolons on the touched lines are normalised alongside. Also corrects a `` typo in the bb-base activity nav that broke the BuddyPress translation lookup for that label. Co-Authored-By: Claude Fable 5.1 --- browsehappy.com/public_html/functions.php | 24 ++-- browsehappy.com/public_html/index.php | 16 +-- .../themes/bb-base/archive-forum.php | 2 +- .../wp-content/themes/bb-base/archive.php | 5 +- .../bb-base/bbpress/feedback-search.php | 2 +- .../bb-base/bbpress/form-topic-merge.php | 28 ++--- .../bb-base/bbpress/form-topic-split.php | 26 ++--- .../themes/bb-base/bbpress/form-topic.php | 40 +++---- .../themes/bb-base/bbpress/loop-forums.php | 4 +- .../bb-base/bbpress/loop-single-topic.php | 2 +- .../bb-base/buddypress/activity/index.php | 38 ++++--- .../members/single/profile/edit.php | 34 ++++-- .../wp-content/themes/bb-base/footer.php | 20 ++-- .../wp-content/themes/bb-base/functions.php | 24 ++-- .../themes/bb-base/header-accessibility.php | 16 +-- .../wp-content/themes/bb-base/image.php | 6 +- .../wp-content/themes/bb-base/index.php | 5 +- .../themes/bb-base/page-homepage.php | 2 +- .../wp-content/themes/bb-base/sidebar.php | 24 ++-- .../wp-content/themes/bb-base/single.php | 5 +- .../themes/bbpress-org/bbpress/form-topic.php | 42 +++---- .../themes/bbpress-org/header-front.php | 22 ++-- .../themes/bbpress-org/page-plugins.php | 14 ++- .../wp-content/themes/bbpress-org/sidebar.php | 28 ++--- .../themes/bporg-developer/header.php | 4 +- .../page-reference-landing.php | 12 +- .../reference/template-source.php | 14 ++- .../buddypress-org/bbpress/form-topic.php | 42 +++---- .../themes/buddypress-org/footer.php | 20 ++-- .../themes/buddypress-org/header-front.php | 38 +++---- .../themes/buddypress-org/header-nav.php | 14 +-- .../themes/buddypress-org/sidebar.php | 30 ++--- .../themes/codex-bbpress-org/footer.php | 20 ++-- .../themes/codex-bbpress-org/index.php | 5 +- .../codex-buddypress-org/activity-entry.php | 14 +-- .../themes/codex-buddypress-org/footer.php | 20 ++-- .../codex-buddypress-org/header-nav.php | 14 +-- .../themes/codex-buddypress-org/index.php | 5 +- .../codex-buddypress-org/widgets/inbox.php | 4 +- .../codex-buddypress-org/widgets/login.php | 14 ++- .../downloads/rosetta-downloads.php | 18 +-- .../class-translation-editors-list-table.php | 8 +- .../roles/views/cross-locale-pte.php | 10 +- .../roles/views/edit-cross-locale-pte.php | 12 +- .../roles/views/edit-translation-editor.php | 16 +-- .../roles/views/translation-editors.php | 18 +-- .../mu-plugins/showcase/rosetta-showcase.php | 4 +- .../wp-content/themes/rosetta/404.php | 4 +- .../wp-content/themes/rosetta/archive.php | 103 ++++++++++-------- .../wp-content/themes/rosetta/comments.php | 91 ++++++++-------- .../wp-content/themes/rosetta/contact.php | 48 ++++---- .../wp-content/themes/rosetta/download.php | 8 +- .../wp-content/themes/rosetta/front-page.php | 8 +- .../wp-content/themes/rosetta/functions.php | 2 +- .../themes/rosetta/inc/template-tags.php | 6 +- .../wp-content/themes/rosetta/index.php | 2 +- .../themes/rosetta/sidebar-blog.php | 4 +- .../themes/rosetta/sidebar-page.php | 8 +- .../wp-content/themes/rosetta/single.php | 2 +- .../plugins/jobswp/jobswp-captcha.php | 2 +- .../plugins/jobswp/jobswp-moderation.php | 2 +- .../wp-content/plugins/jobswp/jobswp.php | 27 +++-- .../wp-content/themes/jobswp/content-list.php | 2 +- .../jobswp/content-post-job-success.php | 19 ++-- .../themes/jobswp/content-post-job.php | 63 +++++------ .../themes/jobswp/inc/template-tags.php | 10 +- .../wp-content/themes/jobswp/no-results.php | 8 +- .../themes/jobswp/page-remove-a-job.php | 6 +- .../wp-content/themes/jobswp/searchform.php | 2 +- .../wp-content/themes/jobswp/sidebar.php | 4 +- .../plugins/handbook/inc/admin-notices.php | 8 +- .../plugins/handbook/inc/handbook.php | 2 +- .../plugins/handbook/inc/navigation.php | 2 +- .../plugins/handbook/inc/widgets.php | 2 +- .../plugins/photo-directory/inc/admin.php | 34 +++--- .../plugins/photo-directory/inc/flagged.php | 4 +- .../photo-directory/inc/moderation.php | 4 +- .../plugins/photo-directory/inc/rejection.php | 20 ++-- .../plugins/photo-directory/inc/settings.php | 2 +- .../admin/class-customizations.php | 10 +- .../admin/class-status-transitions.php | 5 +- .../admin/list-table/class-committers.php | 8 +- .../admin/list-table/class-plugin-posts.php | 8 +- .../admin/list-table/class-support-reps.php | 8 +- .../admin/metabox/class-author-card.php | 22 ++-- .../admin/metabox/class-author.php | 2 +- .../admin/metabox/class-controls.php | 24 ++-- .../admin/metabox/class-internal-notes.php | 2 +- .../admin/metabox/class-review-tools.php | 2 +- .../admin/tools/class-author-cards.php | 12 +- .../admin/tools/class-stats-report.php | 52 ++++----- .../admin/tools/class-upload-token.php | 20 ++-- .../api/routes/class-plugin.php | 2 +- .../shortcodes/class-block-validator.php | 38 +++---- .../shortcodes/class-readme-validator.php | 2 +- .../shortcodes/class-release-confirmation.php | 36 +++--- .../shortcodes/class-reviews.php | 4 +- .../shortcodes/class-upload.php | 48 ++++---- .../widgets/class-adopt-me.php | 4 +- .../widgets/class-committers.php | 4 +- .../plugin-directory/widgets/class-donate.php | 4 +- .../plugin-directory/widgets/class-meta.php | 20 ++-- .../widgets/class-support-reps.php | 4 +- .../widgets/class-support.php | 8 +- .../class-locale-associations-view.php | 36 +++--- .../support-forums/inc/class-blocks.php | 2 +- .../support-forums/inc/class-hooks.php | 8 +- .../support-forums/inc/class-moderators.php | 2 +- .../support-forums/inc/class-nsfw-handler.php | 2 +- .../inc/class-ratings-compat.php | 30 ++--- .../support-forums/inc/class-report-topic.php | 16 +-- .../plugins/theme-directory/admin-edit.php | 29 ++--- .../class-wporg-themes-upload.php | 4 +- .../theme-directory/theme-directory.php | 2 +- .../trac-notifications/trac-components.php | 8 +- .../plugins/wp-i18n-teams/inc/locales.php | 4 +- .../wp-i18n-teams/views/all-locales.php | 26 ++--- .../wp-i18n-teams/views/locale-details.php | 26 ++--- .../wporg-bbp-also-viewing.php | 2 +- .../inc/class-plugin.php | 2 +- .../templates/helper-functions.php | 4 +- .../templates/index-locales.php | 6 +- .../templates/locale-project.php | 16 +-- .../templates/locale-projects.php | 4 +- .../templates/project-form.php | 16 +-- .../templates/project-mass-create-sets.php | 9 +- .../projects-wp-plugins-contributors.php | 2 +- .../projects-wp-themes-contributors.php | 2 +- .../templates/settings.php | 2 +- .../templates/stats-overview.php | 2 +- .../templates/translation-row-editor.php | 30 ++--- .../templates/translation-row-preview.php | 2 +- .../templates/translation-set-form.php | 10 +- .../wporg-gp-discussions/inc/class-plugin.php | 4 +- .../inc/admin/class-translators.php | 4 +- .../admin/list-table/class-translators.php | 4 +- .../wporg-meeting-posttype.php | 30 ++--- .../pub/wporg-breathe-2024/functions.php | 8 +- .../themes/pub/wporg-breathe-2024/search.php | 4 +- .../pub/wporg-breathe-2024/searchform.php | 4 +- .../wporg-breathe-2024/single-handbook.php | 2 +- .../themes/pub/wporg-login/backup-codes.php | 18 +-- .../themes/pub/wporg-login/checkemail.php | 6 +- .../themes/pub/wporg-login/enable-2fa.php | 12 +- .../wporg-login/functions-registration.php | 6 +- .../themes/pub/wporg-login/functions.php | 2 +- .../themes/pub/wporg-login/linkexpired.php | 28 ++--- .../themes/pub/wporg-login/loggedout.php | 8 +- .../themes/pub/wporg-login/login.php | 10 +- .../themes/pub/wporg-login/logout.php | 4 +- .../themes/pub/wporg-login/lostpassword.php | 6 +- .../partials/register-profilefields.php | 10 +- .../themes/pub/wporg-login/pending-create.php | 16 +-- .../pub/wporg-login/pending-profile.php | 20 ++-- .../themes/pub/wporg-login/register.php | 22 ++-- .../themes/pub/wporg-login/updated-tos.php | 6 +- .../themes/pub/wporg-main/front-page.php | 68 ++++++------ .../wporg-main/page-download-beta-nightly.php | 4 +- .../themes/pub/wporg-main/page-download.php | 6 +- .../wporg-plugins-2024/inc/template-tags.php | 48 ++++---- .../wporg-plugins-2024/patterns/page-add.php | 4 +- .../themes/pub/wporg-showcase/404.php | 4 +- .../themes/pub/wporg-showcase/archive.php | 2 +- .../themes/pub/wporg-showcase/comments.php | 4 +- .../themes/pub/wporg-showcase/functions.php | 12 +- .../themes/pub/wporg-showcase/index.php | 2 +- .../themes/pub/wporg-showcase/page-home.php | 10 +- .../themes/pub/wporg-showcase/page-submit.php | 34 +++--- .../pub/wporg-showcase/sidebar-left.php | 4 +- .../themes/pub/wporg-support-2024/404.php | 2 +- .../pub/wporg-support-2024/archive-forum.php | 2 +- .../bbpress/content-single-forum.php | 2 +- .../bbpress/feedback-no-search.php | 6 +- .../bbpress/feedback-no-topics.php | 6 +- .../bbpress/feedback-search.php | 2 +- .../wporg-support-2024/bbpress/form-reply.php | 8 +- .../bbpress/form-topic-merge.php | 30 ++--- .../bbpress/form-topic-split.php | 28 ++--- .../wporg-support-2024/bbpress/form-topic.php | 60 +++++----- .../bbpress/form-user-edit.php | 2 +- .../bbpress/loop-forums-homepage.php | 4 +- .../bbpress/loop-forums.php | 6 +- .../bbpress/loop-single-reply-topic.php | 14 ++- .../bbpress/loop-single-topic.php | 2 +- .../bbpress/user-profile.php | 4 +- .../bbpress/user-subscriptions.php | 4 +- .../pub/wporg-support-2024/functions.php | 28 ++--- .../pub/wporg-support-2024/page-homepage.php | 12 +- .../pub/wporg-support-2024/searchform.php | 8 +- .../themes/pub/wporg-support-2024/sidebar.php | 17 +-- .../wp-content/themes/pub/wporg/404.php | 2 +- .../themes/pub/wporg/inc/template-tags.php | 2 +- .../pub/wporg/template-parts/content-none.php | 2 +- .../wp-content/themes/wptv2/404.php | 4 +- .../wp-content/themes/wptv2/archive.php | 12 +- .../wp-content/themes/wptv2/breadcrumbs.php | 2 +- .../wp-content/themes/wptv2/comments.php | 6 +- .../wp-content/themes/wptv2/functions.php | 4 +- .../wp-content/themes/wptv2/index.php | 2 +- .../wptv2/upload-subtitles-template.php | 8 +- .../content/mu-plugins/locales.php | 2 +- 201 files changed, 1376 insertions(+), 1300 deletions(-) diff --git a/browsehappy.com/public_html/functions.php b/browsehappy.com/public_html/functions.php index 2fe3a5adf3..340a1175d2 100644 --- a/browsehappy.com/public_html/functions.php +++ b/browsehappy.com/public_html/functions.php @@ -268,21 +268,21 @@ function browsehappy_browser_notice() {
-

- +

+ -

+

-

+

-

- -

-

+

+ +

+

-

-

-

+

+

+

Click here to change the language to English.', 'browsehappy' ), '/?locale=en' ); + printf( wp_kses_post( __( 'Browse Happy is also available in English. Click here to change the language to English.', 'browsehappy' ) ), '/?locale=en' ); ?>

- <?php _e( 'Browse Happy', 'browsehappy' ); ?> + <?php esc_html_e( 'Browse Happy', 'browsehappy' ); ?> @@ -34,8 +34,8 @@
-

Happy', 'browsehappy' ); ?>

-

Upgrade your browser today!', 'browsehappy' ); ?>

+

Happy', 'browsehappy' ) ); ?>

+

Upgrade your browser today!', 'browsehappy' ) ); ?>

@@ -47,8 +47,8 @@

name; ?>

info; ?>

-

' . apply_filters( 'get_browsehappy_version', $browser ) . '' ); ?>

-

+

' . apply_filters( 'get_browsehappy_version', $browser ) . '' ); ?>

+

@@ -59,12 +59,12 @@ diff --git a/buddypress.org/public_html/wp-content/themes/bb-base/archive-forum.php b/buddypress.org/public_html/wp-content/themes/bb-base/archive-forum.php index 4e11a3581a..ca99eebe00 100644 --- a/buddypress.org/public_html/wp-content/themes/bb-base/archive-forum.php +++ b/buddypress.org/public_html/wp-content/themes/bb-base/archive-forum.php @@ -1,6 +1,6 @@ -

+

diff --git a/buddypress.org/public_html/wp-content/themes/bb-base/archive.php b/buddypress.org/public_html/wp-content/themes/bb-base/archive.php index 1b55a7029b..afb03f2911 100644 --- a/buddypress.org/public_html/wp-content/themes/bb-base/archive.php +++ b/buddypress.org/public_html/wp-content/themes/bb-base/archive.php @@ -8,7 +8,8 @@ '' . __( 'Page', 'bborg' ) . ' ', ) ); else : ?> -

+

-

+

diff --git a/buddypress.org/public_html/wp-content/themes/bb-base/bbpress/form-topic-merge.php b/buddypress.org/public_html/wp-content/themes/bb-base/bbpress/form-topic-merge.php index a6b0907436..9379b31756 100644 --- a/buddypress.org/public_html/wp-content/themes/bb-base/bbpress/form-topic-merge.php +++ b/buddypress.org/public_html/wp-content/themes/bb-base/bbpress/form-topic-merge.php @@ -21,25 +21,25 @@
- +
-

-

+

+

-

+

- +
false, 'post_parent' => bbp_get_topic_forum_id( bbp_get_topic_id() ), 'post__not_in' => array( bbp_get_topic_id() ) ) ) ) : ?> - + - + @@ -65,24 +65,24 @@
- +
-
+
-
+
-
+
@@ -90,11 +90,11 @@
-

WARNING: This process cannot be undone.', 'bbpress' ); ?>

+

WARNING: This process cannot be undone.', 'bbpress' ) ); ?>

- +
@@ -107,7 +107,7 @@
-
+
diff --git a/buddypress.org/public_html/wp-content/themes/bb-base/bbpress/form-topic-split.php b/buddypress.org/public_html/wp-content/themes/bb-base/bbpress/form-topic-split.php index 1d507892bf..867b57fa90 100644 --- a/buddypress.org/public_html/wp-content/themes/bb-base/bbpress/form-topic-split.php +++ b/buddypress.org/public_html/wp-content/themes/bb-base/bbpress/form-topic-split.php @@ -21,24 +21,24 @@
- +
-

+

-

+

- +
- +
@@ -46,7 +46,7 @@
- +
- +
-
+
-
+
-
+
@@ -93,11 +93,11 @@
-

WARNING: This process cannot be undone.', 'bbpress' ); ?>

+

WARNING: This process cannot be undone.', 'bbpress' ) ); ?>

- +
@@ -110,7 +110,7 @@
-
+
diff --git a/buddypress.org/public_html/wp-content/themes/bb-base/bbpress/form-topic.php b/buddypress.org/public_html/wp-content/themes/bb-base/bbpress/form-topic.php index 9c73227605..81bc97fc99 100644 --- a/buddypress.org/public_html/wp-content/themes/bb-base/bbpress/form-topic.php +++ b/buddypress.org/public_html/wp-content/themes/bb-base/bbpress/form-topic.php @@ -21,9 +21,9 @@ @@ -33,9 +33,9 @@
-

-

-

trac ticket with detailed duplication steps.', 'bbporg' ); ?>

+

+

+

trac ticket with detailed duplication steps.', 'bbporg' ) ); ?>

@@ -43,7 +43,7 @@
-

+

@@ -51,7 +51,7 @@
-

+

@@ -65,7 +65,7 @@

-
+

@@ -76,7 +76,7 @@

-
+

@@ -91,7 +91,7 @@

-
+

@@ -100,7 +100,7 @@

-
+
/>

@@ -111,7 +111,7 @@

-
+
bbp_get_form_topic_forum() ) ); ?>

@@ -125,7 +125,7 @@

-
+
@@ -144,11 +144,11 @@ - + - +

@@ -164,11 +164,11 @@
/> -
+
-
+
@@ -183,7 +183,7 @@ - + @@ -206,7 +206,7 @@
-

+

@@ -214,7 +214,7 @@
-

+

diff --git a/buddypress.org/public_html/wp-content/themes/bb-base/bbpress/loop-forums.php b/buddypress.org/public_html/wp-content/themes/bb-base/bbpress/loop-forums.php index 1eb3b6289f..265b384dfd 100644 --- a/buddypress.org/public_html/wp-content/themes/bb-base/bbpress/loop-forums.php +++ b/buddypress.org/public_html/wp-content/themes/bb-base/bbpress/loop-forums.php @@ -5,8 +5,8 @@
    • -
    • -
    • +
    • +
  • diff --git a/buddypress.org/public_html/wp-content/themes/bb-base/bbpress/loop-single-topic.php b/buddypress.org/public_html/wp-content/themes/bb-base/bbpress/loop-single-topic.php index b9efb64080..0c84fc3f67 100644 --- a/buddypress.org/public_html/wp-content/themes/bb-base/bbpress/loop-single-topic.php +++ b/buddypress.org/public_html/wp-content/themes/bb-base/bbpress/loop-single-topic.php @@ -46,7 +46,7 @@ - '14' ) ) ); ?> + '14' ) ) ); ?> diff --git a/buddypress.org/public_html/wp-content/themes/bb-base/buddypress/activity/index.php b/buddypress.org/public_html/wp-content/themes/bb-base/buddypress/activity/index.php index 63f3bb7490..818e9f3ee5 100644 --- a/buddypress.org/public_html/wp-content/themes/bb-base/buddypress/activity/index.php +++ b/buddypress.org/public_html/wp-content/themes/bb-base/buddypress/activity/index.php @@ -16,7 +16,7 @@
      -
    • ', 'buddypress' ), 'ms' ); ?>
    • +
    • %s', 'buddypress' ) ), 'ms' ); ?>
    • @@ -26,7 +26,7 @@ -
    • %s', 'buddypress' ), bp_get_total_friend_count( bp_loggedin_user_id() ) ); ?>
    • +
    • %s', 'buddypress' ) ), bp_get_total_friend_count( bp_loggedin_user_id() ) ); ?>
    • @@ -38,7 +38,7 @@ -
    • %s', 'buddypress' ), bp_get_total_group_count_for_user( bp_loggedin_user_id() ) ); ?>
    • +
    • %s', 'buddypress' ) ), bp_get_total_group_count_for_user( bp_loggedin_user_id() ) ); ?>
    • @@ -48,13 +48,17 @@ -
    • ">%s', 'buddypress' ), bp_get_total_favorite_count_for_user( bp_loggedin_user_id() ) ); ?>
    • +
    • ">%s', 'buddypress' ) ), bp_get_total_favorite_count_for_user( bp_loggedin_user_id() ) ); ?>
    • -
    • %s new', 'buddypress' ), bp_get_total_mention_count_for_user( bp_loggedin_user_id() ) ); ?>
    • +
    • + + %s new', 'buddypress' ) ), bp_get_total_mention_count_for_user( bp_loggedin_user_id() ) ); ?>
    • @@ -64,44 +68,44 @@