charset icon indicating copy to clipboard operation
charset copied to clipboard

special case of charset regexp

Open jeromew opened this issue 10 years ago • 0 comments

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.

jeromew avatar Jun 09 '15 09:06 jeromew