[wp-trac] [WordPress Trac] #54232: Unbreakable spaces not escaped

WordPress Trac noreply at wordpress.org
Fri Oct 8 01:15:54 UTC 2021


#54232: Unbreakable spaces not escaped
-------------------------------------+-------------------------------------
 Reporter:  jdy68                    |       Owner:  audrasjb
     Type:  defect (bug)             |      Status:  reviewing
 Priority:  normal                   |   Milestone:  5.9
Component:  Administration           |     Version:
 Severity:  normal                   |  Resolution:
 Keywords:  needs-patch has-         |     Focuses:  javascript,
  screenshots                        |  administration
-------------------------------------+-------------------------------------
Changes (by SergeyBiryukov):

 * milestone:  Awaiting Review => 5.9


Comment:

 Replying to [comment:4 audrasjb]:
 > Moving to component `Administration` as it looks like the bug will
 probably occur on each JavaScript confirm or alert box of the WordPress
 admin.

 I think the issue is about that specific string in [source:tags/5.8.1/src
 /wp-admin/includes/image-edit.php?marks=252#L250 wp-admin/includes/image-
 edit.php]. As noted in the ticket description, other similar strings are
 displayed correctly.

 I was able to reproduce the issue with that string in the latest Microsoft
 Edge version using these steps:
 * Switch to the fr_FR locale.
 * Open an image in Media Library for editing.
 * Make some changes and click the Cancel button.
 * Note the ` ` entities in the message.

 The string is retrieved for displaying using the jQuery `.html()` function
 in [source:tags/5.8.1/src/js/_enqueues/lib/image-
 edit.js?marks=896-898#L879 wp-admin/js/image-edit.js]. Replacing `.html()`
 with `.text()` fixes the issue in my testing.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/54232#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list