[wp-trac] [WordPress Trac] #29910: esc_attr does not properly deal with json_encode

WordPress Trac noreply at wordpress.org
Thu Oct 9 21:37:37 UTC 2014


#29910: esc_attr does not properly deal with json_encode
-------------------------+-----------------------------------
 Reporter:  enej         |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  General      |     Version:  trunk
 Severity:  normal       |  Resolution:
 Keywords:               |     Focuses:  javascript, template
-------------------------+-----------------------------------

Comment (by enej):

 Another solution could be to detect if a json_encoded string is being
 passed into the esc_attr( ) function and if that is the case handle it
 differently from a string. This way no new function is created.

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


More information about the wp-trac mailing list