Skip to content
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

JS file containing SVG incorrectly detected as SVG #107

Open
genezys opened this issue Jul 18, 2024 · 0 comments
Open

JS file containing SVG incorrectly detected as SVG #107

genezys opened this issue Jul 18, 2024 · 0 comments

Comments

@genezys
Copy link

genezys commented Jul 18, 2024

I recently encountered a JS file containing SVG code that is incorrectly detected as image/svg+xml instead of 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"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant