html validator middleware

27 views
Skip to first unread message

Brian St. Pierre

unread,
Jun 18, 2007, 11:48:48 PM6/18/07
to Django users
I recently hacked together a small middleware that validates all
outgoing html and if it encounters a validation error, throws a 500
status code and error page with the validation error message(s) and
html source.

Similar in aim to Luke Plant's Validator App (http://lukeplant.me.uk/
resources/djangovalidator/), but lighter weight.

Requires python 2.4 (for the subprocess module).
Requires the offline "validate" utility for HTML validation from
HTMLHelp.com, or its equivalent.

Available here: http://bstpierre.org/Projects/HtmlValidatorMiddleware/

Comments & questions welcome.

-Brian St. Pierre
br...@bstpierre.org

Reply all
Reply to author
Forward
0 new messages