[wp-trac] [WordPress Trac] #44728: Quick edit for taxonomies is using filtered data
WordPress Trac
noreply at wordpress.org
Mon Aug 6 15:52:45 UTC 2018
#44728: Quick edit for taxonomies is using filtered data
--------------------------+------------------------------
Reporter: joyously | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Taxonomy | Version: 4.9.7
Severity: normal | Resolution:
Keywords: 2nd-opinion | Focuses: administration
--------------------------+------------------------------
Changes (by subrataemfluence):
* keywords: => 2nd-opinion
* focuses: => administration
* component: General => Taxonomy
Comment:
`htmlentities()` function decodes special characters to their
corresponding HTML entities.
So, when I tried
{{{
$tag_name_value = htmlentities( $tag->name );
}}}
instead of
{{{
$tag_name_value = esc_attr( $tag->name );
}}}
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`
{{{
val = $('.name', rowData);
val = val.text();
}}}
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:
{{{
val = $('.name-raw', rowData);
val = val.text();
}}}
--
Ticket URL: <https://core.trac.wordpress.org/ticket/44728#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list