charset
charset copied to clipboard
special case of charset regexp
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.