Skip to content

Commit

Permalink
Simplify regex in AutoVerify.php.
Browse files Browse the repository at this point in the history
  • Loading branch information
kagg-design committed Jul 19, 2023
1 parent 5c9c5c4 commit c5726d5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/php/AutoVerify/AutoVerify.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 );
}
/**
Expand All @@ -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];
}

Expand Down

0 comments on commit c5726d5

Please sign in to comment.