Ticket #6915 (closed defect (bug): fixed)
Make international slugs easier to edit
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| 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:
- they are unreadable;
- hard to edit (unless you can do %-encoding right in your head);
- getting truncated because of being overly long.
Steps to reproduce:
- switch your keyboard to any non Latin-1 based language;
- enter post/tagegory title;
- try to edit it.
Solution:
just urldecode() slugs on output.
PS why WikiFormatting does not work here?
Attachments
Change History
-
attachment
urldecode-nicenames.patch
added
- 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
comment:4
follow-up:
↓ 7
nbachiyski — 4 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.
nbachiyski — 4 years ago
-
attachment
editable-slug-filter.diff
added
Patch, which allows to manipulate the slug, which the user can edit
comment:6
nbachiyski — 4 years ago
Attached a patch with appropriate filters, to make such a plugin possible.
- 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.
- 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).
- 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:9
joostdevalk — 4 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
joostdevalk — 4 years ago
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
- 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
options — 3 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?
actually, it always has (best I'm aware anyway), when an email rather than a nick is entered in a cc field.
comment:16
dwright — 2 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.
comment:17
nbachiyski — 2 years ago
- 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.

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