New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
UTF-8 BOM can break metadata detection #1823
Comments
Cannot reproduce. Please provide an exact file that produces this error. I just wrote this test script which:
Starts with a valid UTF-8 BOM. And it installs just fine for me, the |
I have the original file, but how do I attach it here? It will only accept an image, not a zip file (since the script is 1.6 million in size). Ah, never mind, the link to the zipped file on dropbox is https://www.dropbox.com/s/nfvdw58t661xkzq/181098-Userscript.zip |
Thanks for figuring that out. So, reproduced with http://arantius.com/misc/gm-test/181098.user.js which will not successfully parse the
The first four bytes are (I think) handled as a BOM, correctly. But the next four break GM, which wants |
When trying to install a user script the @name would be ignored and the script name became the script name (ie 181098.user.js became 181098 for a name) and all @includes and @excludes became ignored such that it indicated that the script runs on everything ( * ).
I discovered that the script appeared to be a UTF-8 with BOM (there was a hidden - character in the front of the file (ahead of the // === Userscript === line and the // appeared to be in character position 1 and 2)
Greasemonkey version 1.12
The text was updated successfully, but these errors were encountered: