Make WordPress Core

Opened 15 years ago

Closed 14 years ago

#6915 closed defect (bug) (fixed)

Make international slugs easier to edit

Reported by: options's profile options Owned by: westi's profile 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 15 years ago.
urldecodes() nicenames in Post/Page/Tagegories nicenames on output
editable-slug-filter.diff (3.0 KB) - added by nbachiyski 15 years ago.
Patch, which allows to manipulate the slug, which the user can edit

Download all attachments as: .zip

Change History (19)

@options
15 years ago

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

#1 @options
15 years ago

  • Component changed from General to Administration

#2 @westi
15 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

#3 @westi
15 years ago

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

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

#4 follow-up: @nbachiyski
15 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.

#5 @westi
15 years ago

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

@nbachiyski
15 years ago

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

#6 @nbachiyski
15 years ago

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

#7 in reply to: ↑ 4 @options
15 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.

#8 @ryan
15 years ago

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

#9 @joostdevalk
15 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);

}}}}

#10 @joostdevalk
15 years ago

hmm ok i meant:

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

#11 @Denis-de-Bernardy
14 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

#12 @options
14 years ago

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

#13 @Denis-de-Bernardy
14 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.

#14 @options
14 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?

#15 @Denis-de-Bernardy
14 years ago

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

#16 @dwright
14 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

#17 @nbachiyski
14 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.