From c5726d58e05f41dffb5b91a0c0e5872210f1ad13 Mon Sep 17 00:00:00 2001 From: kagg-design Date: Wed, 19 Jul 2023 18:54:44 +0300 Subject: [PATCH] Simplify regex in AutoVerify.php. --- src/php/AutoVerify/AutoVerify.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/php/AutoVerify/AutoVerify.php b/src/php/AutoVerify/AutoVerify.php index bf4c4950..99a36dbc 100644 --- a/src/php/AutoVerify/AutoVerify.php +++ b/src/php/AutoVerify/AutoVerify.php @@ -267,7 +267,7 @@ private function get_visible_input_names( $form ) { * @return bool */ private function is_input_visible( $input ) { - return ! preg_match( '#type[\s]*?=[\s]*?["\']hidden["\']#', $input ); + return ! preg_match( '#type\s*?=\s*?["\']hidden["\']#', $input ); } /** @@ -278,7 +278,7 @@ private function is_input_visible( $input ) { * @return string|null */ private function get_input_name( $input ) { - if ( preg_match( '#name[\s]*?=[\s]*?["\'](.+?)["\']#', $input, $matches ) ) { + if ( preg_match( '#name\s*?=\s*?["\'](.+?)["\']#', $input, $matches ) ) { return $matches[1]; }