WordPress.org

Make WordPress Core

Opened 7 years ago

Closed 5 years ago

#6915 closed defect (bug) (fixed)

Make international slugs easier to edit

Reported by: options Owned by: westi
Milestone: 2.9 Priority: normal
Severity: normal Version: 2.5.1
Component: Editor Keywords: needs-patch
Focuses: Cc:

Description

any non Latin-1 based Slugs are presented to a user in the precent encoded form:

  1. they are unreadable;
  2. hard to edit (unless you can do %-encoding right in your head);
  3. getting truncated because of being overly long.

Steps to reproduce:

  1. switch your keyboard to any non Latin-1 based language;
  2. enter post/tagegory title;
  3. try to edit it.

Solution:

just urldecode() slugs on output.



PS why WikiFormatting does not work here?

Attachments (2)

urldecode-nicenames.patch (2.9 KB) - added by options 7 years ago.
urldecodes() nicenames in Post/Page/Tagegories nicenames on output
editable-slug-filter.diff (3.0 KB) - added by nbachiyski 7 years ago.
Patch, which allows to manipulate the slug, which the user can edit

Download all attachments as: .zip

Change History (19)

@options7 years ago

urldecodes() nicenames in Post/Page/Tagegories nicenames on output

comment:1 @options7 years ago

  • Component changed from General to Administration

comment:2 @westi7 years ago

  • Milestone changed from 2.7 to 2.6
  • Owner changed from anonymous to westi
  • Status changed from new to assigned
  • Version set to 2.5.1

comment:3 @westi7 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

(In [7887]) Make international slugs easier to edit. Fixes #6915 props options.

comment:4 follow-up: @nbachiyski7 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

This behaviour was entirely intentional. Users don't like percent signs in their URLs and with this patch we are fooling them, that there won't be any.

This change would be a great plugin for the small percentage of people, who want their URLs full of percentage signs.

comment:5 @westi7 years ago

(In [7891]) Revert [7887] see #6915.

@nbachiyski7 years ago

Patch, which allows to manipulate the slug, which the user can edit

comment:6 @nbachiyski7 years ago

Attached a patch with appropriate filters, to make such a plugin possible.

comment:7 in reply to: ↑ 4 @options7 years ago

  • Summary changed from international Nicenames (aka Slugs) should be URLdecoded() to Make international slugs easier to edit

first of all, thanks for the very fast reply and the hooks provided.

Replying to nbachiyski:

This behaviour was entirely intentional. Users don't like percent signs in their URLs and with this patch we are fooling them, that there won't be any.

while it's true that some users are a bit scared of percent signs in their IRIs, so that, for nothing better, they resort to renaming an every slug into numeric form (which is so '98).

however, are Google and my browser both fooling me by automatically decoding IRIs into the human-readable form?

no! instead, I'd call this a genuine focus on user comfort, usability and adhering to the standards.

This change would be a great plugin for the small percentage of people, who want their URLs full of percentage signs.

  1. most of the people (just by default) use their national language in the slugs as a matter of fact (see picture above).

that said, such a plugin, unfortunately, won't solve the issue for the majority of WP users (using a stock install or .com hosted).

  1. actually, only the small percentage of people can be bothered to transliterate -- let alone to translate in English (as some elitists do) -- an *every* post slug, thus trying to fool themselves and everyone else around.

comment:8 @ryan7 years ago

(In [7896]) Add editable_slug filter. Props nbachiyski. see #6915

comment:9 @joostdevalk7 years ago

That patch makes it possible to write a plugin, which makes it impossible to change the slug... It should only be possible to filter there if a name has not yet been saved, so something like this would work better:

{{{if ($name == $original_name) {

$post->post_name = apply_filters('editable_slug', $post->post_name);

}}}}

comment:10 @joostdevalk7 years ago

hmm ok i meant:

if ($name == $original_name) {
  $post->post_name = apply_filters('editable_slug', $post->post_name);
}

comment:11 @Denis-de-Bernardy6 years ago

  • Cc options removed
  • Component changed from Administration to Permalinks
  • Keywords needs-patch added; has-patch removed
  • Milestone changed from 2.9 to Future Release
  • Type changed from defect (bug) to enhancement

comment:12 @options6 years ago

  • Cc tismee@… added
  • Type changed from enhancement to defect (bug)

comment:13 @Denis-de-Bernardy6 years ago

  • Component changed from Permalinks to Editor
  • Milestone changed from Future Release to 2.9

Doh, sorry. I thought it was misplaced keyword.

Punting this back into 2.9, since you think it's a bug rather than an enhancement.

comment:14 @options6 years ago

That's all right. Thanks for putting this back!

Now I wonder why Trac has begun to display (albeit partial) e-mail address in the CC field rather than login handle, as it used to do prior 2.8?

comment:15 @Denis-de-Bernardy6 years ago

actually, it always has (best I'm aware anyway), when an email rather than a nick is entered in a cc field.

comment:16 @dwright5 years ago

  • Cc david_v_wright@… added

I just came across this ticket, there is a newer ticket filed for a seemingly similiar (same?) issue. I believe one of these could be a dup of the other, there is a diff (two) attached to the other.

http://core.trac.wordpress.org/ticket/10966

comment:17 @nbachiyski5 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

This one was fixed in [10108]. The other ticket has some additional problems, so we will take it from there on.

Note: See TracTickets for help on using tickets.