Skip to content
This repository has been archived by the owner on May 5, 2023. It is now read-only.

Parses meta with useless semicolons incorrectly #17

Closed
melusc opened this issue Oct 12, 2021 · 2 comments · Fixed by #18
Closed

Parses meta with useless semicolons incorrectly #17

melusc opened this issue Oct 12, 2021 · 2 comments · Fixed by #18

Comments

@melusc
Copy link
Contributor

melusc commented Oct 12, 2021

With a datauri like data:text/plain;,text, and the library parsing it, it results in .typeFull equalling text/plain;;charset=US-ASCII (instead of text/plain;charset=US-ASCII).

With a datauri like data:;,text, and the library parsing it, it results in .typeFull equalling text/plain; (instead of text/plain).

( I do think that they are valid datauris because browsers return what you'd expect, for example data:text/html;;,<h1>Hello</h1> showing a huge Hello )

Replacing this line with } else if(meta[i]) { fixed it for me.

@TooTallNate
Copy link
Owner

Ya that seems like a bug. Pull request welcome!

@melusc
Copy link
Contributor Author

melusc commented Oct 12, 2021

If nobody does so before me, I'll make one tomorrow.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants