sepiariver / recaptchav2

Google's ReCaptcha V2 + V3 for MODX CMS: https://sepiariver.com/modx/recaptchav2-supports-recaptchav3/
https://sepiariver.com/
GNU General Public License v2.0
21 stars 15 forks source link

Hyphens are removed from form_id #49

Closed ghost closed 5 years ago

ghost commented 5 years ago

I noticed in the new update, some of my old forms that have IDs formatted as word-word the hyphen is removed. Is this intentional? In reference to #48.

sepiariver commented 5 years ago

Changing that regex was to normalize it against what the Recaptcha API requires (in V3 with the introduction of Actions). The previous regex should have done exactly the same with respect to dashes.

That said, why did I put the regex into the V2 Snippet at all? Just a short sighted mistake I’m afraid. I just released a new version that reverts the regex for V2.

Notwithstanding the new V2 Snippet accepts properties for the TPL Chunk do you can do

&myId=`id-with-dashes`

And in your Chunk go [[+myId]]. Again V2 won’t care (but V3 will).