Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

special case of charset regexp #7

Open
jeromew opened this issue Jun 9, 2015 · 0 comments
Open

special case of charset regexp #7

jeromew opened this issue Jun 9, 2015 · 0 comments

Comments

@jeromew
Copy link

jeromew commented Jun 9, 2015

Hello

I just encountered a website that has <meta charset="text/html;charset=iSO-8859-1">.
The current regexp detects the charset as text instead of iso-8859-1.

html5 seems to accept the charset attribute (https://developer.mozilla.org/fr/docs/Web/HTML/Element/meta#attr-charset) ; I am not sure that the content here is valid (a sort of recursive charset=) but it is a real meta found in the wild.

a solution could be to match all occurences of the regexp and keep only the last match.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant