Make WordPress Core

Opened 34 hours ago

Last modified 50 minutes ago

#66314 new defect (bug)

HMTL entities in wp-admin/js/inline-edit-post.js:219

Reported by: timse201 Owned by:
Priority: normal Milestone: Awaiting Review
Component: Administration Version: trunk
Severity: normal Keywords: has-patch
Cc: Focuses: javascript

Description

Change History (1)

This ticket was mentioned in ​PR #14336 on ​WordPress/wordpress-develop by ​@therssoftware.


50 minutes ago
#1

  • Keywords has-patch added

Description

In src/js/_enqueues/admin/inline-edit-post.js, line 224:

buttonVisuallyHiddenText = wp.i18n.sprintf(
    /* translators: %s: Post title. */
    wp.i18n.__( 'Remove “%s” from Bulk Edit' ),
    theTitle
);

HTML entities like “ and ” should not be present in JavaScript translatable strings:

  1. In GlotPress (translate.wordpress.org), translators for languages with different quotation rules (such as German „...“ or French «...») are forced to deal with raw numeric HTML character references rather than standard typographical punctuation.
  2. In client-side JavaScript, translatable strings are intended as literal text. Replacing “ and ” with Unicode curly quotes “ and ” adheres to WordPress internationalization best practices and ensures consistent rendering across both assistive technology and localization tooling.

Testing Instructions

  1. Navigate to Posts > All Posts in the WordPress admin.
  2. Select multiple posts by checking their checkboxes in the table.
  3. In the Bulk Actions dropdown, select Edit and click Apply.
  4. Inspect the Bulk Edit area showing the list of selected posts.
  5. Inspect the remove button markup for each post (.ntdelbutton .screen-reader-text):
    • Before: Contains Remove “...” from Bulk Edit (raw entity string).
    • After: Contains Remove “...” from Bulk Edit (clean curly quotes).
  6. Verify clicking the remove button continues to remove the item from the bulk edit list as expected.
Note: See TracTickets for help on using tickets.