Found two missing `esc_js()` calls as well.

This commit is contained in:
George Stephanis 2015-08-05 12:52:11 -04:00
parent ecd503ec2c
commit aed0b0e891
2 changed files with 13 additions and 2 deletions

View File

@ -145,7 +145,18 @@ if ( ! defined( 'ABSPATH' ) ) {
jQuery('.wc_tax_rates .export').click(function() {
var csv_data = "data:application/csv;charset=utf-8,<?php _e( 'Country Code', 'woocommerce' ); ?>,<?php _e( 'State Code', 'woocommerce' ); ?>,<?php _e( 'ZIP/Postcode', 'woocommerce' ); ?>,<?php _e( 'City', 'woocommerce' ); ?>,<?php _e( 'Rate %', 'woocommerce' ); ?>,<?php _e( 'Tax Name', 'woocommerce' ); ?>,<?php _e( 'Priority', 'woocommerce' ); ?>,<?php _e( 'Compound', 'woocommerce' ); ?>,<?php _e( 'Shipping', 'woocommerce' ); ?>,<?php _e( 'Tax Class', 'woocommerce' ); ?>\n";
var csv_data = "data:application/csv;charset=utf-8,<?php echo esc_js( implode( ',', array(
__( 'Country Code', 'woocommerce' ),
__( 'State Code', 'woocommerce' ),
__( 'ZIP/Postcode', 'woocommerce' ),
__( 'City', 'woocommerce' ),
__( 'Rate %', 'woocommerce' ),
__( 'Tax Name', 'woocommerce' ),
__( 'Priority', 'woocommerce' ),
__( 'Compound', 'woocommerce' ),
__( 'Shipping', 'woocommerce' ),
__( 'Tax Class', 'woocommerce' ),
) ) ); ?>\n";
jQuery('#rates tr:visible').each(function() {
var row = '';

View File

@ -14,7 +14,7 @@ if ( ! defined( 'ABSPATH' ) ) {
</div>
<script type="text/javascript">
jQuery( '.wc-update-now' ).click( 'click', function() {
var answer = confirm( '<?php _e( 'It is strongly recommended that you backup your database before proceeding. Are you sure you wish to run the updater now?', 'woocommerce' ); ?>' );
var answer = confirm( '<?php echo esc_js( __( 'It is strongly recommended that you backup your database before proceeding. Are you sure you wish to run the updater now?', 'woocommerce' ) ); ?>' );
return answer;
});
</script>