Skip to content

Commit

Permalink
Merge pull request #408 from woocommerce/pcp-315-html-input
Browse files Browse the repository at this point in the history
Do not remove html for plugin settings text inputs
  • Loading branch information
Dinamiko authored Dec 15, 2021
2 parents a1e30a5 + 1514841 commit 2967b63
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions modules/ppcp-wc-gateway/src/Settings/SettingsListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -372,14 +372,11 @@ private function retrieve_settings_from_raw_data( array $raw_data ): array {
case 'text':
case 'number':
case 'ppcp-text-input':
case 'ppcp-password':
$settings[ $key ] = isset( $raw_data[ $key ] ) ? sanitize_text_field( $raw_data[ $key ] ) : '';
$settings[ $key ] = isset( $raw_data[ $key ] ) ? wp_kses_post( $raw_data[ $key ] ) : '';
break;
case 'ppcp-password':
case 'password':
if ( empty( $raw_data[ $key ] ) ) {
break;
}
$settings[ $key ] = sanitize_text_field( $raw_data[ $key ] );
$settings[ $key ] = $raw_data[ $key ] ?? '';
break;
case 'ppcp-multiselect':
$values = isset( $raw_data[ $key ] ) ? (array) $raw_data[ $key ] : array();
Expand Down

0 comments on commit 2967b63

Please sign in to comment.