From f06c9ab80122e56ba25e8a44dccab86bb1d84d4e Mon Sep 17 00:00:00 2001 From: kagg-design Date: Mon, 21 Oct 2024 20:03:38 +0300 Subject: [PATCH] Fix missing hCaptcha in Formidable forms. --- readme.txt | 1 + src/php/FormidableForms/Form.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/readme.txt b/readme.txt index 71dcd95a..91e6adad 100644 --- a/readme.txt +++ b/readme.txt @@ -577,6 +577,7 @@ Instructions for popular native integrations are below: * Fixed sending a Ninja form with solved hCaptcha. * Fixed non-active hCaptcha when editing a page containing a Forminator form. * Fixed launching notifications script on every admin page. +* Fixed missing hCaptcha in Formidable forms. = 4.6.0 = * Added support for Simple Membership Login, Register and Lost Password forms. diff --git a/src/php/FormidableForms/Form.php b/src/php/FormidableForms/Form.php index dde08aa1..b72734d8 100644 --- a/src/php/FormidableForms/Form.php +++ b/src/php/FormidableForms/Form.php @@ -113,7 +113,7 @@ public function add_captcha( $html, array $field, array $atts ) { return $html; } - if ( ! preg_match( '#
#', (string) $html, $m ) ) { + if ( ! preg_match( '##', (string) $html, $m ) ) { return $html; }