esc_textarea, wp_richedit_pre and wp_htmledit_pre eat post content under PHP 5.4
|Reported by:||westi||Owned by:||westi|
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.
- 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
Change History (12)
- Owner set to westi
- Resolution set to fixed
- Status changed from new to closed
- Resolution fixed deleted
- Severity changed from major to blocker
- Status changed from closed to reopened