[wp-trac] [WordPress Trac] #41596: New Text Widget recognizes HTML but does not render it in the front end

WordPress Trac noreply at wordpress.org
Thu Aug 10 09:57:40 UTC 2017


#41596: New Text Widget recognizes HTML but does not render it in the front end
--------------------------+--------------------
 Reporter:  mrfoxtalbot   |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  4.8.2
Component:  Widgets       |     Version:  4.8
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:  ui
--------------------------+--------------------

Comment (by azaozz):

 Replying to [comment:6 westonruter]:

 Nice catch! Wondering if we should be using `format_for_editor` like in
 the main editor, or directly do `htmlspecialchars( $text, ENT_NOQUOTES,
 get_option( 'blog_charset' ) );`, see:
 https://core.trac.wordpress.org/browser/tags/4.8/src/wp-
 includes/formatting.php#L3691. I prefer using the filter but that may
 bring some ...problems with plugins that expect it to only run for the
 main editor perhaps?

 We also need to make sure there is no `</textarea` string in the content,
 see: https://core.trac.wordpress.org/browser/tags/4.8/src/wp-includes
 /class-wp-editor.php#L289.

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


More information about the wp-trac mailing list