Opened 14 years ago
Closed 10 years ago
#16496 closed defect (bug) (fixed)
Make $sample_permalink_html human-readable on Edit Post screen
Reported by: | linuxologos | Owned by: | johnbillion |
---|---|---|---|
Milestone: | 4.1 | Priority: | normal |
Severity: | normal | Version: | 2.5 |
Component: | Administration | Keywords: | has-patch commit |
Focuses: | administration | Cc: |
Description
If the permalink contains words with non-latin characters (for example the permalink structure is /%category%/%postname%/ and the assigned category is non-English) the $sample_permalink_html, which is echoed by edit-form-advanced.php, is not human readable on Edit Post screen (below the title). The editable part of the permalink (the one that comes from the title of the post) is readable.
$sample_permalink_html should be urldecoded at some stage before echoed.
Screenshot attached.
Attachments (5)
Change History (12)
#1
follow-up:
↓ 3
@
14 years ago
- Keywords needs-patch added
- Milestone changed from Awaiting Review to Future Release
That is actually the text you would get if you were to copy/paste from the browser's location bar.
I was going to say that we should try to fix the slug sanitization, but since all letters can be non-ascii, like in the screenshot, we should fix this instead.
#2
@
14 years ago
Also, when using an IDN domain, sample permalink displays it in Punycode. It should be human-readable too.
#3
in reply to:
↑ 1
@
14 years ago
Replying to scribu:
That is actually the text you would get if you were to copy/paste from the browser's location bar.
In Opera and Safari an URL is copied in human-readable form.
#4
@
13 years ago
- Keywords has-patch added; needs-patch removed
16496.patch urldecodes $sample_permalink_html upon definition.
16496.2.patch urldecodes $sample_permalink_html just before being echoed.
The latter can affect the Shortlink part and may not be desirable.
A third solution would be to alter the get_sample_permalink_html() function in wp-admin/includes/post.php, but it doesn't sound as the best solution.
The local $sample_permalink_html in wp-admin/edit-form-advanced.php is definitely intended to be printed on screen, so it can and should be human-readable.
#5
@
10 years ago
- Component changed from Formatting to Administration
- Keywords reporter-feedback added
Seems to work for me.
@linuxologos is this still broken for you in WordPress 4.0?
#6
@
10 years ago
- Focuses administration added
- Keywords commit added; reporter-feedback removed
- Milestone changed from Future Release to 4.1
- Type changed from enhancement to defect (bug)
- Version set to 2.5
This is still an issue. It doesn't affect the post slug, just the rest of the permalink (eg. a when using a permastructure which includes the category name, and the post is in a category with punycode in its slug).
16496.3.patch urldecodes the permalink in the most appropriate place.
Same permalink, urldecoded.