Skip to content

Commit

Permalink
Fix missing hCaptcha in Formidable forms.
Browse files Browse the repository at this point in the history
  • Loading branch information
kagg-design committed Oct 21, 2024
1 parent c05b777 commit f06c9ab
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion src/php/FormidableForms/Form.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ public function add_captcha( $html, array $field, array $atts ) {
return $html;
}

if ( ! preg_match( '#<div id="(.+)" class="h-captcha" .+></div>#', (string) $html, $m ) ) {
if ( ! preg_match( '#<div\s+id="(.+)"\s+class="h-captcha" .+></div>#', (string) $html, $m ) ) {
return $html;
}

Expand Down

0 comments on commit f06c9ab

Please sign in to comment.