[wp-trac] [WordPress Trac] #23688: esc_textarea, wp_richedit_pre and wp_htmledit_pre eat post content under PHP 5.4

WordPress Trac noreply at wordpress.org
Thu Mar 14 20:29:31 UTC 2013


#23688: esc_textarea, wp_richedit_pre and wp_htmledit_pre eat post content under
PHP 5.4
--------------------------+-----------------------
 Reporter:  westi         |       Owner:  westi
     Type:  defect (bug)  |      Status:  reopened
 Priority:  high          |   Milestone:  3.6
Component:  Formatting    |     Version:  trunk
 Severity:  blocker       |  Resolution:
 Keywords:  has-patch     |
--------------------------+-----------------------

Comment (by azaozz):

 Looks like we will need to normalize `get_option( 'blog_charset' )` before
 using it here and limit it to the supported values.

 Another case that fails is when the user pastes content with different
 encoding into the editor (Visual or Text). Then it can contain invalid
 code sequences and htmlspecialchars() will return an empty string. Perhaps
 will need to use `ENT_SUBSTITUTE` or `ENT_DISALLOWED` in PHP 5.4 to work
 around this (pending better documentation of how exactly these flags work,
 see http://php.net/manual/en/function.htmlspecialchars.php).

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/23688#comment:6>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list