[wp-trac] [WordPress Trac] #50692: WordPress v5.4.2 Escaping Problem in the Edit Media Screen
WordPress Trac
noreply at wordpress.org
Sat Jul 18 02:04:24 UTC 2020
#50692: WordPress v5.4.2 Escaping Problem in the Edit Media Screen
----------------------------+-----------------------------
Reporter: rafaelcardero | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Editor | Version: 5.4.2
Severity: normal | Keywords:
Focuses: administration |
----------------------------+-----------------------------
**Summary**:
WordPress v5.4.2 escapes the content of the Description field in the Edit
Media screen if the filter {{{'user_can_richedit'}}} returns {{{false}}}.
**How to Replicate**
1) Upload an attachment and open the Edit Media screen
2) Add a simple HTML markup to the Description field. Example: {{{<p>Hello
World!</p>}}}
3) Save changes and check that the content of the field is not HTML
escaped
4) Add the following line to the current theme
{{{add_filter('user_can_richedit', '__return_false', 999, 0);}}}
5) Go back to the Edit Media screen and save changes again
6) Problem: The content of the field Description is HTML escaped
**Context**
I administer a WordPress website since many years ago and I disabled the
WYSIWIG editor setting the value of the filter {{{'user_can_richedit'}}}
to {{{false}}}. I like to enter HTML code directly. Now I am unable to use
HTML code in the Description field as I did previously.
Probably other users are also facing this problem.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/50692>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list