Fatal error: Cannot read property 'replace' of undefined
ramirezcgn opened this issue · 7 comments
ramirezcgn commented
Hi, I found an issue with your library when there are special characters, for example "á", the error occurs in htmllint.js:60:59 and it's related to message.url that comes undefined, can you check?
Thanks
jzaefferer commented
Can you provide a sample HTML file that can help us reproduce the issue?
ramirezcgn commented
This file is Windows encoded (no utf8):
index.html:
<!DOCTYPE html>
<html lang="es" xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Página de Ejemplo</title>
</head>
<body>
<div class="main">
Esta es una página de ejemplo.
</div>
</body>
</html>
jzaefferer commented
Could you please upload the file with its original encoding somewhere? I don't think a copy in a comment helps.
ramirezcgn commented
Attached file as txt
jzaefferer commented
Thanks, that helped. Published a fix as 8.0.1 and reported an upstream issue: validator/validator#313
ramirezcgn commented
Thanks :)
sideshowbarker commented
I’ve just released v16.6.29 with a fix for the underlying problem that’s the cause of this issue.