[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
Mon Mar 4 17:27:25 UTC 2013


#23688: esc_textarea, wp_richedit_pre and wp_htmledit_pre eat post content under
PHP 5.4
-----------------------+--------------------------
 Reporter:  westi      |       Type:  defect (bug)
   Status:  new        |   Priority:  high
Milestone:  3.6        |  Component:  Formatting
  Version:  trunk      |   Severity:  major
 Keywords:  has-patch  |
-----------------------+--------------------------
 Because of a change in default behaviour in {{{htmlspecialchars}}} in
 PHP5.4 it is possible for these three functions to eat perfectly valid
 post content and make it impossible to edit existing posts.

 Scenario:
  * blog_charset is ISO-8859-1
  * Post contains some 8bit characters

 You try and edit the post and instead of the post content you are
 presented with a blank editor :(

 On the front end the posts display fine.

 The underlying cause it this change in {{{htmlspecialchars}}}

 "5.4.0  The default value for the encoding parameter was changed to
 UTF-8."

 Because the string is not a valid UTF-8 sequence an empty string is
 returned :(


 Related to #20368

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


More information about the wp-trac mailing list