[2.5] Fixed tax row autocomplete htmlentity, closes #10149

This commit is contained in:
Claudio Sanches 2016-01-23 14:32:09 -02:00
parent 7d627e105c
commit e87007d5cd
1 changed files with 3 additions and 4 deletions

View File

@ -109,16 +109,15 @@ class WC_Settings_Tax extends WC_Settings_Page {
* Output tax rate tables. * Output tax rate tables.
*/ */
public function output_tax_rates() { public function output_tax_rates() {
global $wpdb, global $wpdb, $current_section;
$current_section;
$current_class = $this->get_current_tax_class(); $current_class = $this->get_current_tax_class();
$countries = array(); $countries = array();
foreach ( WC()->countries->get_allowed_countries() as $value => $label ) { foreach ( WC()->countries->get_allowed_countries() as $value => $label ) {
$countries[] = array( $countries[] = array(
'label' => $label,
'value' => $value, 'value' => $value,
'label' => esc_js( html_entity_decode( $label ) ),
); );
} }
@ -126,8 +125,8 @@ class WC_Settings_Tax extends WC_Settings_Page {
foreach ( WC()->countries->get_allowed_country_states() as $label ) { foreach ( WC()->countries->get_allowed_country_states() as $label ) {
foreach ( $label as $code => $state ) { foreach ( $label as $code => $state ) {
$states[] = array( $states[] = array(
'label' => $state,
'value' => $code, 'value' => $code,
'label' => esc_js( html_entity_decode( $state ) ),
); );
} }
} }