validator/grunt-html

Fatal error: Cannot read property 'replace' of undefined

ramirezcgn opened this issue · 7 comments

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

Can you provide a sample HTML file that can help us reproduce the issue?

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>

Could you please upload the file with its original encoding somewhere? I don't think a copy in a comment helps.

Attached file as txt

index.txt

Thanks, that helped. Published a fix as 8.0.1 and reported an upstream issue: validator/validator#313

Thanks :)

I’ve just released v16.6.29 with a fix for the underlying problem that’s the cause of this issue.

https://github.com/validator/validator/releases/tag/16.6.29