WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 3 years ago

Last modified 3 years ago

#30633 closed defect (bug) (fixed)

Properly cut non-latin slugs on Edit Post screen if mbstring is disabled

Reported by: SergeyBiryukov Owned by:
Milestone: 4.2 Priority: normal
Severity: normal Version: 2.7
Component: Posts, Post Types Keywords:
Focuses: ui, administration Cc:
PR Number:

Description

Background: #29573

If mbstring is disabled, we don't properly cut non-latin slugs with strlen() more than 30. See [6633], [6794], and [9986].

Possible options:

  • Shorten the string with JavaScript
  • Introduce a compat version of mb_strlen() (we already have one for mb_substr())
  • Reconsider the UX (brief Slack discussion)

Attachments (3)

30633-mb-strlen.diff (886 bytes) - added by meloniq 5 years ago.
Adds mb_strlen() compatibility function
30633.diff (954 bytes) - added by DrewAPicture 5 years ago.
Docs update
30633.2.diff (2.5 KB) - added by SergeyBiryukov 5 years ago.
Similar to the current mb_substr() implementation, with some cleanup

Download all attachments as: .zip

Change History (8)

@meloniq
5 years ago

Adds mb_strlen() compatibility function

This ticket was mentioned in Slack in #core by ocean90. View the logs.


5 years ago

@DrewAPicture
5 years ago

Docs update

@SergeyBiryukov
5 years ago

Similar to the current mb_substr() implementation, with some cleanup

#2 @kraftbj
5 years ago

  • Keywords reporter-feedback added

Nothing that [32114] added a mb_strlen compat function. @SergeyBiryukov —does that resolve this?

#3 @Clorith
4 years ago

#34646 was marked as a duplicate.

#4 @SergeyBiryukov
3 years ago

  • Keywords reporter-feedback removed
  • Milestone changed from Future Release to 4.2
  • Resolution set to fixed
  • Status changed from new to closed

Fixed in [32114].

#5 @SergeyBiryukov
3 years ago

In 38147:

Posts, Post Types: Remove a redundant function_exists( 'mb_strlen' ) check in get_sample_permalink_html().

mb_strlen() is always available since [32114].

See #30633.

Note: See TracTickets for help on using tickets.