Ticket #6915 (reopened defect)

Opened 2 months ago

Last modified 2 months ago

Make international slugs easier to edit

Reported by: options Assigned to: westi
Priority: normal Milestone: 2.6
Component: Administration Version: 2.5.1
Severity: normal Keywords: has-patch
Cc: options

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

urldecode-nicenames.patch (2.9 kB) - added by options on 05/04/08 18:26:06.
urldecodes() nicenames in Post/Page/Tagegories nicenames on output
editable-slug-filter.diff (3.0 kB) - added by nbachiyski on 05/05/08 09:11:46.
Patch, which allows to manipulate the slug, which the user can edit

Change History

05/04/08 18:26:06 changed by options

  • attachment urldecode-nicenames.patch added.

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

05/04/08 18:39:26 changed by options

  • component changed from General to Administration.

05/04/08 21:12:33 changed by westi

  • owner changed from anonymous to westi.
  • status changed from new to assigned.
  • version set to 2.5.1.
  • milestone changed from 2.7 to 2.6.

05/04/08 21:13:43 changed by westi

  • status changed from assigned to closed.
  • resolution set to fixed.

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

(follow-up: ↓ 7 ) 05/05/08 06:57:46 changed by nbachiyski

  • status changed from closed to reopened.
  • resolution deleted.

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.

05/05/08 08:15:54 changed by westi

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

05/05/08 09:11:46 changed by nbachiyski

  • attachment editable-slug-filter.diff added.

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

05/05/08 09:12:12 changed by nbachiyski

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

(in reply to: ↑ 4 ) 05/05/08 13:25:39 changed by options

  • 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).

2. 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.

05/05/08 17:08:13 changed by ryan

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

05/19/08 19:28:25 changed by joostdevalk

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);

}}}}

05/19/08 19:29:23 changed by joostdevalk

hmm ok i meant:

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