We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
I recently encountered a JS file containing SVG code that is incorrectly detected as image/svg+xml instead of application/javascript.
image/svg+xml
application/javascript
Here is an illustration of the problem using an empty SVG image.
Marcel::MimeType.for StringIO.new(<<~JS) window.el495_s4oco3nfv=`<?xml version="1.0" encoding="utf-8"?><svg version="1.1" xmlns="http://www.w3.org/2000/svg">...</svg>`; JS => "image/svg+xml"
The text was updated successfully, but these errors were encountered:
I have the same issue with an Excel file that has <svg somewhere in the first 4096 bytes.
<svg
Marcel::MAGIC = Marcel::MAGIC.reject { |type, _| type == 'image/svg+xml' }
Is a workaround so it does not accidentally detect the file as image/svg+xml.
Sorry, something went wrong.
No branches or pull requests
I recently encountered a JS file containing SVG code that is incorrectly detected as
image/svg+xml
instead ofapplication/javascript
.Here is an illustration of the problem using an empty SVG image.
The text was updated successfully, but these errors were encountered: