Skip to content

Commit

Permalink
Trim inputs. Fixes #133
Browse files Browse the repository at this point in the history
  • Loading branch information
kraftbj committed Oct 22, 2020
1 parent 7c39375 commit d972edb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions class-bjgk-genesis-enews-extended.php
Original file line number Diff line number Diff line change
Expand Up @@ -242,11 +242,11 @@ public function widget( $args, $instance ) {
* @return array Settings to save or bool false to cancel saving
*/
public function update( $new_instance, $old_instance ) { // phpcs:ignore VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable
$new_instance['title'] = strip_tags( $new_instance['title'], '<i>' );
$new_instance['text'] = wp_kses_post( $new_instance['text'] );
$new_instance['title'] = trim( strip_tags( $new_instance['title'], '<i>' ) );
$new_instance['text'] = trim( wp_kses_post( $new_instance['text'] ) );
$new_instance['hidden_fields'] = strip_tags( $new_instance['hidden_fields'], '<a>, <div>, <fieldset>, <input>, <label>, <legend>, <option>, <optgroup>, <select>, <textarea>' );
$new_instance['after_text'] = wp_kses_post( $new_instance['after_text'] );
$new_instance['id'] = str_replace( 'http://feeds.feedburner.com/', '', $new_instance['id'] );
$new_instance['after_text'] = trim( wp_kses_post( $new_instance['after_text'] ) );
$new_instance['id'] = trim( str_replace( 'http://feeds.feedburner.com/', '', $new_instance['id'] ) );
$new_instance['display_privacy'] = ( isset( $new_instance['display_privacy'] ) ) ? (int) $new_instance['display_privacy'] : 0;

if ( isset( $new_instance['mailpoet_check'] ) ) {
Expand Down

0 comments on commit d972edb

Please sign in to comment.