Make WordPress Core

#21625 closed defect (bug) (fixed)

Recent Drafts widget issue with UTF-8 characters

Reported by: SergeyBiryukov Owned by: nacin
Milestone: 3.5 Priority: normal
Severity: normal Version: 2.7
Component: Administration Keywords: has-patch commit
Focuses: Cc:


Same issue as in #11528.

\s incorrectly targets some UTF-8 characters (Cyrillic Р or Hebrew נ).

Steps to reproduce:

  1. Create a draft with "САПР" as a content.
  2. It will be displayed as "САП�" in the Recent Drafts dashboard widget.

Attachments (2)

21625.patch (987 bytes) - added by SergeyBiryukov 20 months ago.
21625.2.patch (986 bytes) - added by SergeyBiryukov 19 months ago.
Removed "+" sign (unnecessary with PREG_SPLIT_NO_EMPTY)

Download all attachments as: .zip

Change History (4)

SergeyBiryukov20 months ago

SergeyBiryukov19 months ago

Removed "+" sign (unnecessary with PREG_SPLIT_NO_EMPTY)

comment:1 ryan18 months ago

  • Keywords commit added

comment:2 nacin18 months ago

  • Owner set to nacin
  • Resolution set to fixed
  • Status changed from new to closed

In [22306]:

Split by [\r\n\t ] rather than \s to avoid UTF-8 issues. props SergeyBiryukov. fixes #21625.

Note: See TracTickets for help on using tickets.