Skip to content

JS file containing SVG incorrectly detected as SVG #107

@genezys

Description

@genezys

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"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions