Make WordPress Core

Opened 12 years ago

Closed 10 years ago

Last modified 10 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:
Priority: normal Milestone: 4.2
Component: Posts, Post Types Version: 2.7
Severity: normal Keywords:
Cc: Focuses: ui, administration

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 12 years ago.
Adds mb_strlen() compatibility function
30633.diff (954 bytes ) - added by DrewAPicture 11 years ago.
Docs update
30633.2.diff (2.5 KB ) - added by SergeyBiryukov 11 years ago.
Similar to the current mb_substr() implementation, with some cleanup

Download all attachments as: .zip

Change History (8)

@meloniq
12 years ago

Adds mb_strlen() compatibility function

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


11 years ago

@DrewAPicture
11 years ago

Docs update

@SergeyBiryukov
11 years ago

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

#2 @kraftbj
11 years ago

  • Keywords reporter-feedback added

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

#3 @Clorith
11 years ago

#34646 was marked as a duplicate.

#4 @SergeyBiryukov
10 years ago

  • Keywords reporter-feedback removed
  • Milestone Future Release4.2
  • Resolutionfixed
  • Status newclosed

Fixed in [32114].

#5 @SergeyBiryukov
10 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.