Hello, my forms are working but there is an issue with Firefox.
When redirecting, Netlify injects a script tag with data from the submitted form just after <head> causing Firefox to show this error (console):
The character encoding declaration of document was found too late for it to take effect. The encoding declaration needs to be moved to be within the first 1024 bytes of the file.
Which causes encoding issues in my site.
Is there anything that can be done in my end?
Could Netlify inject the (useful) script tag before </head> to prevent such issues?
Can you tell me which script tag it is that you’re saying we are injecting? We don’t inject a script tag in to your code when you using forms. If you can provide a link and/or screen shots that would be useful.
I just tested it, the tag below is added just after opening <head> in the the page listed in the action attribute (I’ve redacted some identifying information, but left the ids):
Thanks @marcosmesser, I wasn’t sure which script injection you were referring to. Can you link me to your site so that I can test this and have a repro case for the request I need to file.
Thanks @marcosmesser. I got an issue filed. We’ll let you know once we know more. Note that this shouldn’t actually prevent your site from working though.
thanks for letting us know about this! I understand that it is pretty frustrating, but I have no news for you on when we might implement a fix for this I’m afraid.
We have some news we’re excited to share. Thanks to some diligent work, we’ve been able to amend this behaviour and we’ve changed the way this works. The code change has already been deployed
Please let us know if you still have issues with this, let us know. Thanks for helping us make our products work even better for you & for your patience as we worked to roll this out.