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

fix: detect svgs with title as image/svg+xml intead of text/html #100

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

sjoulbak
Copy link

@sjoulbak sjoulbak commented Mar 4, 2024

Hi @jeremy 👋

I just updated marcel and noticed some failing specs on our side. After some investigation I saw that SVGs with a title did not had the context type of image/svg+xml anymore, but text/html instead. This issue is introduced after merging #74 and released at 1.0.3. The title element provides an accessible, short-text description of the SVG and so cannot be used to determine whether an element is text/html.

This issue is introduced after merging rails#74 and released at 1.0.3.
The title element provides an accessible, short-text description
of the SVG and so cannot be used to determine whether an element
is text/html.
Copy link
Member

@jeremy jeremy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @sjoulbak. Nice catch.

Note that the tables.rb file is autogenerated and must not be directly edited. Please use data/custom.xml or lib/marcel/mime_type/definitions.rb to override.

@sjoulbak
Copy link
Author

sjoulbak commented Mar 11, 2024

@jeremy Thanks for the review! I'll undo the change at tables.rb and follow your instructions at a later moment.

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

Successfully merging this pull request may close these issues.

2 participants