[wp-trac] [WordPress Trac] #28725: wp_editor may not load utf-8 content

WordPress Trac noreply at wordpress.org
Wed Jul 2 21:42:04 UTC 2014


#28725: wp_editor may not load utf-8 content
--------------------------+-----------------------------
 Reporter:  tomas.k.7     |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Formatting    |    Version:  3.9.1
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 '''requirements:'''
 wp_options -> blog_charset = 'UTF-8'


 '''brief problem description:'''
 when you send string containing character \xA0 to wp_editor(), it loads
 without any content.


 '''technical background:'''
 caused by

 {{{
 $output = htmlspecialchars($output, ENT_NOQUOTES, get_option(
 'blog_charset' ) );
 }}}
 in wp-includes/formatting.php at lines 2802 and 2821


 '''one of possible examples how to simulate the the issue:'''
 {{{
 ...
 $content = html_entity_decode('A A');
 wp_editor($content, ...);
 ...
 }}}

 result is dependent on php version used, some versions may work
 correctly...

--
Ticket URL: <https://core.trac.wordpress.org/ticket/28725>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list