From d972edb12b1f1969486891d3901c02a74c93703d Mon Sep 17 00:00:00 2001 From: Brandon Kraft Date: Thu, 22 Oct 2020 14:51:11 -0500 Subject: [PATCH] Trim inputs. Fixes #133 --- class-bjgk-genesis-enews-extended.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/class-bjgk-genesis-enews-extended.php b/class-bjgk-genesis-enews-extended.php index e77b0d4..56493e0 100644 --- a/class-bjgk-genesis-enews-extended.php +++ b/class-bjgk-genesis-enews-extended.php @@ -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'], '' ); - $new_instance['text'] = wp_kses_post( $new_instance['text'] ); + $new_instance['title'] = trim( strip_tags( $new_instance['title'], '' ) ); + $new_instance['text'] = trim( wp_kses_post( $new_instance['text'] ) ); $new_instance['hidden_fields'] = strip_tags( $new_instance['hidden_fields'], ',
,
, ,