[wp-trac] [WordPress Trac] #7648: js_escape() wrongly escapes too many characters

WordPress Trac wp-trac at lists.automattic.com
Wed Nov 18 00:33:21 UTC 2009


#7648: js_escape() wrongly escapes too many characters
---------------------------------------+------------------------------------
 Reporter:  Viper007Bond               |        Owner:  azaozz 
     Type:  defect (bug)               |       Status:  closed 
 Priority:  low                        |    Milestone:         
Component:  JavaScript                 |      Version:  2.6.1  
 Severity:  minor                      |   Resolution:  invalid
 Keywords:  needs-patch needs-testing  |  
---------------------------------------+------------------------------------
Changes (by azaozz):

  * status:  new => closed
  * resolution:  => invalid
  * milestone:  2.9 =>


Comment:

 Seems to work properly. It is intended for escaping strings used in JS
 context in a tag attribute, for example:
 {{{
 <a onclick="alert('<?php echo esc_js($my_text); ?>'); return false;" ...
 }}}

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/7648#comment:18>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list