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

Incorrect XML magic identification when <title tag present #110

Open
IBazylchuk opened this issue Aug 26, 2024 · 1 comment
Open

Incorrect XML magic identification when <title tag present #110

IBazylchuk opened this issue Aug 26, 2024 · 1 comment

Comments

@IBazylchuk
Copy link

If the XML has a <title tag, it is incorrectly identified as XML.

This behavior has been changed in this pull request https://github.com/rails/marcel/pull/74/files#diff-1fc2f7a3e2d7dad99c84d6f99f9eb59b810e6fde227789b70fa450163c39ee52R2402

Steps to reproduce

xml = %{<?xml version="1.0" encoding="UTF-8"?><source><jobs><job><title><![CDATA[Test tiltle]]></title><city><![CDATA[Boston]]></city><state><![CDATA[MA]]></state><zip/><country><![CDATA[USA]]></country></job></jobs></source>}

Marcel::Magic.by_magic(xml).type

# => "text/html"
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

2 participants
@IBazylchuk and others