Skip to content

Commit 3d48477

Browse files
committed
Fix escaping for sprintf output
1 parent 5689b6f commit 3d48477

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

includes/wp-admin/class-settings-fields.php

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -438,10 +438,12 @@ public static function render_site_blocked_domains_field() {
438438
<details style="margin: 10px 0;">
439439
<summary style="cursor: pointer; padding: 8px 0; color: inherit;">
440440
<?php
441-
\printf(
442-
/* translators: %s: Number of blocked domains */
443-
\esc_html( \_n( '%s blocked domain', '%s blocked domains', $count, 'activitypub' ) ),
444-
\number_format_i18n( $count )
441+
echo \esc_html(
442+
\sprintf(
443+
/* translators: %s: Number of blocked domains */
444+
\_n( '%s blocked domain', '%s blocked domains', $count, 'activitypub' ),
445+
\number_format_i18n( $count )
446+
)
445447
);
446448
?>
447449
</summary>
@@ -484,10 +486,12 @@ public static function render_site_blocked_keywords_field() {
484486
<details style="margin: 10px 0;">
485487
<summary style="cursor: pointer; padding: 8px 0; color: inherit;">
486488
<?php
487-
\printf(
488-
/* translators: %s: Number of blocked keywords */
489-
\esc_html( \_n( '%s blocked keyword', '%s blocked keywords', $count, 'activitypub' ) ),
490-
\number_format_i18n( $count )
489+
echo \esc_html(
490+
\sprintf(
491+
/* translators: %s: Number of blocked keywords */
492+
\_n( '%s blocked keyword', '%s blocked keywords', $count, 'activitypub' ),
493+
\number_format_i18n( $count )
494+
)
491495
);
492496
?>
493497
</summary>

0 commit comments

Comments
 (0)