[HTML Validator] Use the official validator since html5-tidy is too outdated #81

Open
opened 2026-03-14 09:33:01 +00:00 by aniram · 3 comments
Owner

Tidy complains about the use of <menu> for no good reasons, it's too old for our purpose.

Use the official W3C HTML validator called Nu.
It's a Java Web Server, run it inside a Docker container.

Tidy complains about the use of `<menu>` for no good reasons, it's too old for our purpose. Use the official W3C HTML validator called [Nu](https://github.com/validator/validator?tab=readme-ov-file#build-instructions). It's a Java Web Server, run it inside a Docker container.
aniram added this to the 2026.1 milestone 2026-03-14 09:33:05 +00:00
Author
Owner

"Nu" outputs HTML, so create a layer on top of the HTML output that reads it line by line and outputs JSON containing a list of objects with:

  • error message
  • markup code
  • line number
  • template name
    for each error.

Refactor our HTML Validator so that it can work with this JSON like it's a plugable interface, make it independent of the validator currently used. Any validation system that outputs JSON in the format defined above should work with our HTML Validator.

"Nu" outputs HTML, so create a layer on top of the HTML output that reads it line by line and outputs JSON containing a list of objects with: - error message - markup code - line number - template name for each error. Refactor our HTML Validator so that it can work with this JSON like it's a plugable interface, make it independent of the validator currently used. Any validation system that outputs JSON in the format defined above should work with our HTML Validator.
Author
Owner

Also write some simple tests to check if the correct template name is displayed, error message, line number etc.

Also write some simple tests to check if the correct template name is displayed, error message, line number etc.
Author
Owner

Nu's validator is pretty good as it is, maybe just put it in a Docker container and let it be.

Nu's validator is pretty good as it is, maybe just put it in a Docker container and let it be.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
overdrives/cidadon#81
No description provided.