esc_js for translatable string in the javascripts

This commit is contained in:
Gerhard 2013-05-06 14:50:28 +02:00
parent 683d54f957
commit ba923875a2
1 changed files with 2 additions and 2 deletions

View File

@ -121,7 +121,7 @@ function woocommerce_order_downloads_meta_box() {
} else {
alert('<?php _e( 'Could not grant access - the user may already have permission for this file or billing email is not set. Ensure the billing email is set, and the order has been saved.', 'woocommerce' ); ?>');
alert('<?php echo esc_js( __( 'Could not grant access - the user may already have permission for this file or billing email is not set. Ensure the billing email is set, and the order has been saved.', 'woocommerce' ) ); ?>');
}
@ -144,7 +144,7 @@ function woocommerce_order_downloads_meta_box() {
jQuery('.order_download_permissions').on('click', 'button.revoke_access', function(e){
e.preventDefault();
var answer = confirm('<?php _e( 'Are you sure you want to revoke access to this download?', 'woocommerce' ); ?>');
var answer = confirm('<?php echo esc_js( __( 'Are you sure you want to revoke access to this download?', 'woocommerce' ) ); ?>');
if (answer){
var el = jQuery(this).parent().parent();