Changes between Initial Version and Version 1 of Ticket #63675
- Timestamp:
- 07/08/2025 06:02:53 PM (12 months ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Ticket #63675
- Property Focuses accessibility coding-standards php-compatibility removed
- Property Keywords needs-testing removed
-
Ticket #63675 – Description
initial v1 1 1 This patch addresses a small security and translation-related improvement in the `wp-admin/edit-comments.php` file: 2 2 3 ---4 3 5 4 1. Sanitization of Request Inputs 6 5 7 6 Currently, `$_REQUEST['comment_status']` and `$_REQUEST['pagegen_timestamp']` are used directly after `wp_unslash()`: 8 7 {{{ 9 8 $comment_status = wp_unslash( $_REQUEST['comment_status'] ); 10 9 $delete_time = wp_unslash( $_REQUEST['pagegen_timestamp'] ); 10 }}} 11 11 12 12 2. Translatable String Formatting 13 13 14 {{{ 14 15 $messages[] = __( 'This comment is already approved.' ) . sprintf( 15 16 ' <a href="%1$s">%2$s</a>', … … 17 18 __( 'Edit comment' ) 18 19 ); 19 is refactored into a single sprintf()-wrapped translatable string: 20 }}} 21 is refactored into a single `sprintf()`-wrapped translatable string: 22 {{{ 20 23 $messages[] = sprintf( 21 24 __( 'This comment is already approved. <a href="%s">Edit comment</a>' ), 22 25 esc_url( admin_url( "comment.php?action=editcomment&c=$same" ) ) 23 26 ); 24 27 }}}
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)