[wp-trac] Re: [WordPress Trac] #7648: js_escape() wrongly escapes
too many characters
WordPress Trac
wp-trac at lists.automattic.com
Tue Jun 2 09:48:01 GMT 2009
#7648: js_escape() wrongly escapes too many characters
--------------------------+-------------------------------------------------
Reporter: Viper007Bond | Owner: azaozz
Type: defect (bug) | Status: new
Priority: normal | Milestone: 2.8
Component: JavaScript | Version: 2.6.1
Severity: normal | Keywords: has-patch needs-testing
--------------------------+-------------------------------------------------
Comment(by azaozz):
The js_escape()/esc_js() seem to work as expected in echoed html
attributes:
{{{
echo 'onclick="' . "if ( confirm('" . esc_js(__("You are about to delete
...
}}}
Perhaps it needs an arg to specify whether to convert html special chars
to entities.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/7648#comment:15>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list