[wp-trac] [WordPress Trac] #20368: htmlspecialchars() returns empty string for non-UTF-8 input in PHP 5.4

WordPress Trac noreply at wordpress.org
Mon Mar 31 00:29:04 UTC 2014


#20368: htmlspecialchars() returns empty string for non-UTF-8 input in PHP 5.4
--------------------------+------------------------------
 Reporter:  convissor     |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Formatting    |     Version:
 Severity:  major         |  Resolution:
 Keywords:                |     Focuses:
--------------------------+------------------------------

Comment (by miqrogroove):

 I think the scope of the problem is bigger than described above.  Non-
 ascii data arriving at htmlspecialchars are usually supplied by the user
 according to the character encoding specified in HTML headers.  This
 means, for example, you could set the site encoding to iso-8859-1, submit
 a copyright char through a form, and that's all it takes to break the
 system.

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


More information about the wp-trac mailing list