diff --git a/classes/class-wc-settings-api.php b/classes/class-wc-settings-api.php
index 3b0048869c3..0dfd0cc1fe3 100644
--- a/classes/class-wc-settings-api.php
+++ b/classes/class-wc-settings-api.php
@@ -216,7 +216,7 @@ class WC_Settings_API {
$html .= '
' . "\n";
$html .= '';
$html .= ' | ' . "\n";
@@ -373,7 +373,7 @@ class WC_Settings_API {
$text = (isset($this->settings[$key])) ? $this->settings[$key] : '';
if ( isset( $_POST[$this->plugin_id . $this->id . '_' . $key] ) ) {
- $text = esc_attr( trim( $_POST[$this->plugin_id . $this->id . '_' . $key] ) );
+ $text = esc_attr( trim( stripslashes( $_POST[$this->plugin_id . $this->id . '_' . $key] ) ) );
}
return $text;
@@ -410,7 +410,7 @@ class WC_Settings_API {
$text = (isset($this->settings[$key])) ? $this->settings[$key] : '';
if ( isset( $_POST[$this->plugin_id . $this->id . '_' . $key] ) ) {
- $text = esc_attr( trim( $_POST[$this->plugin_id . $this->id . '_' . $key] ) );
+ $text = esc_attr( trim( stripslashes( $_POST[$this->plugin_id . $this->id . '_' . $key] ) ) );
}
return $text;