Ticket #6915 (closed defect (bug): fixed)

Opened 4 years ago

Last modified 2 years ago

Make international slugs easier to edit

Reported by: options Owned by: westi
Priority: normal Milestone: 2.9
Component: Editor Version: 2.5.1
Severity: normal Keywords: needs-patch
Cc: tismee@…, david_v_wright@…

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 Download (2.9 KB) - added by options 4 years ago.
urldecodes() nicenames in Post/Page/Tagegories nicenames on output
editable-slug-filter.diff Download (3.0 KB) - added by nbachiyski 4 years ago.
Patch, which allows to manipulate the slug, which the user can edit

Change History

options4 years ago

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

  • Component changed from General to Administration
  • 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
  • Status changed from assigned to closed
  • Resolution set to fixed

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

comment:4 follow-up: ↓ 7   nbachiyski4 years ago

  • Status changed from closed to reopened
  • Resolution fixed 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.

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

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

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

comment:7 in reply to: ↑ 4   options4 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   ryan4 years ago

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

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

}}}}

hmm ok i meant:

if ($name == $original_name) {
  $post->post_name = apply_filters('editable_slug', $post->post_name);
}
  • Cc options removed
  • Keywords needs-patch added; has-patch removed
  • Type changed from defect (bug) to enhancement
  • Component changed from Administration to Permalinks
  • Milestone changed from 2.9 to Future Release
  • Cc tismee@… added
  • Type changed from enhancement to defect (bug)
  • 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.

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?

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

  • 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

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

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.