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

WordPress Trac wp-trac at lists.automattic.com
Thu Nov 19 07:58:33 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  |  
---------------------------------------+------------------------------------

Comment(by nacin):

 Replying to [comment:19 Viper007Bond]:
 > We should rename the function to `esc_attr_js()` or something then.

 And/or update the phpdoc: "Escapes text strings for echoing in JS, both
 inline (for example in onclick="...") and inside <script> tag."

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


More information about the wp-trac mailing list