[wp-trac] [WordPress Trac] #42461: Drop sanitize_text_field() for widget titles in forms

WordPress Trac noreply at wordpress.org
Mon Dec 4 03:02:47 UTC 2017


#42461: Drop sanitize_text_field() for widget titles in forms
--------------------------+-----------------------------
 Reporter:  greenshady    |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  5.0
Component:  Widgets       |     Version:
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:  administration
--------------------------+-----------------------------
Changes (by welcher):

 * keywords:   => has-patch
 * focuses:   => administration
 * milestone:  Awaiting Review => 5.0


Comment:

 @greenshady I think you're correct, `sanitize_text_field` doesn't need to
 be used when rendering the form initially. Its proper usage is when
 processing the input field. I've added a patch to remove and use only
 `esc_html()` on the output.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/42461#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list