Opened 6 years ago
Last modified 6 years ago
#44728 new defect (bug)
Quick edit for taxonomies is using filtered data
Reported by: | joyously | Owned by: | |
---|---|---|---|
Milestone: | Awaiting Review | Priority: | normal |
Severity: | normal | Version: | 4.9.7 |
Component: | Taxonomy | Keywords: | 2nd-opinion |
Focuses: | administration | Cc: |
Description
Looks like #8146 was not fixed, or is back again.
To reproduce:
- Add a tag with a HTML entity in the name, such as
½
. - Use Quick Edit on the tag page or Quick Edit on the Posts page, and the special character will be shown instead of the
½
. - If you save the tag or post, a new tag with the character is created (instead of using the one with the spelled out entity).
I'm unsure of whether the special characters should be in the slug, but my test showed it was.
Change History (4)
#1
@
6 years ago
- Component changed from General to Taxonomy
- Focuses administration added
- Keywords 2nd-opinion added
This ticket was mentioned in Slack in #core by joyously. View the logs.
6 years ago
#3
@
6 years ago
I think this is not just in Quick Edit.
- Edit a post.
- Add a tag with a special character. (I used test½)
- Update post.
- Go to Tags and see the new tag is there. (but quick edit does not show the entity)
- Go back to edit the post.
- Change a little something in the content and click Update.
- Go back to Tags and see another new tag (with the special character in the slug).
This ticket was mentioned in Slack in #core by joyously. View the logs.
6 years ago
Note: See
TracTickets for help on using
tickets.
htmlentities()
function decodes special characters to their corresponding HTML entities.So, when I tried
instead of
in
wp-admin/edit-tag-form.php
(line no. 123), it brings up the actual database (raw) value in the field. On saving back it retains the value in database without any issue.However, under
quick-edit
section, the value added to the texbox is the on-screen rendered value rather than the actual database (raw) value.File:
wp-admin/js/inline-edit-tax.js
Line no:
137
If we use a hidden field in list view and put the raw value in it, and then use this in Quick-Edit title textbox, it will probably resolve the issue.
Something like: