settings api slashes
This commit is contained in:
parent
173ca818f8
commit
3ce55befc4
|
@ -216,7 +216,7 @@ class WC_Settings_API {
|
|||
$html .= '<td class="forminp">' . "\n";
|
||||
$html .= '<fieldset><legend class="screen-reader-text"><span>' . $title . '</span></legend>' . "\n";
|
||||
$html .= '<label for="' . $this->plugin_id . $this->id . '_' . $key . '">';
|
||||
$html .= '<textarea rows="3" cols="20" class="input-text wide-input '.$data['class'].'" name="' . $this->plugin_id . $this->id . '_' . $key . '" id="' . $this->plugin_id . $this->id . '_' . $key . '" style="'.$data['css'].'">'.esc_textarea($this->settings[$key]).'</textarea>';
|
||||
$html .= '<textarea rows="3" cols="20" class="input-text wide-input '.$data['class'].'" name="' . $this->plugin_id . $this->id . '_' . $key . '" id="' . $this->plugin_id . $this->id . '_' . $key . '" style="'.$data['css'].'">'. esc_attr($this->settings[$key]) .'</textarea>';
|
||||
if ( isset( $data['description'] ) && $data['description'] != '' ) { $html .= '<span class="description">' . $data['description'] . '</span>' . "\n"; }
|
||||
$html .= '</fieldset>';
|
||||
$html .= '</td>' . "\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;
|
||||
|
|
Loading…
Reference in New Issue