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

WordPress Trac noreply at wordpress.org
Thu Oct 9 18:57:39 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 mdawaffe):

 The function name makes it seem like this is the correct function to use
 whenever outputting JSON.  In reality, this technique is most useful when
 outputting JSON into an HTML attribute, as you describe with the `data-
 gallery` example.

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


More information about the wp-trac mailing list