markets / invisible_captcha

🍯 Unobtrusive and flexible spam protection for Rails apps
https://rubygems.org/gems/invisible_captcha
MIT License
1.16k stars 66 forks source link

Markup not valid when run through HTML validator #114

Closed timokleemann closed 1 year ago

timokleemann commented 1 year ago

Is there a way to remove the autocomplete="off" attribute from the hidden field inputs and to move the <style media="screen"> tags somewhere else?

This gem has saved me from an awful lot of spam over the last couple of years but unfortunately, in its latest version, a lot of the markup it produces is not valid:

https://validator.w3.org/nu/?doc=https://www.billingengine.com

(Click on "Message filtering" and uncheck "Warnings" and "Info messages" to see the errors that really matter.)

How can this be fixed?

If I am not mistaken, none of these errors occurred in a previous version of this gem (don't remember which one exactly, though). Would downgrading to it possibly fix all these issues?

markets commented 1 year ago

Hi @timokleemann 👋🏼

Is there a way to remove the autocomplete="off" attribute from the hidden field

No, unfortunately there is no way to remove this attribute right now via settings. But! this is Ruby, so you can monkey-patch the module if you want 😅

move the