W3C home > Mailing lists > Public > www-validator@w3.org > February 2007

using tidy in Markup Validator

From: olivier Thereaux <ot@w3.org>
Date: Wed, 7 Feb 2007 16:54:46 +0100
Message-Id: <9BEC0538-D994-4266-A618-EFFAEA9B9E50@w3.org>
To: www-validator Community <www-validator@w3.org>

Per http://www.w3.org/Bugs/Public/show_bug.cgi?id=1265 I have started  
looking at how we could make the validator output some automatically  
cleaned-up markup for users who would prefer not to fix errors by hand.

A quick hour of hacking gave me:

It's only at the "proof of concept" level for now, but I was  
wondering if anyone had thoughts on how to make it useful, or could  
suggest better wording, etc.

A few things already crossed my mind, I'll write them down here,  
mostly for the record, but also as basis for discussion...

* One thing I thought at first was that if the "tidy" option is ON,  
we could replace the source display with the tidied source. However,  
given that error messages link to the display of the original source,  
it may be a bad idea.

* It does add up to the prerequisites of the software, who are  
already a few. libtidy is not hard to install, but at this point, its  
perl wrapper HTML::Tidy appears to be broken and need to be force- 

* Tidy's great, but not perfect. I can already see complaints or  
sarcasm from users who ran their markup through tidy, saved, and were  
disappointed to see that the result was not necessarily perfect/valid.

* I suspect there may be pathological cases where tidy just gives up  
cleaning some source code. Would have to be tested and properly caught.

Any thought?
Received on Wednesday, 7 February 2007 15:54:54 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:59:00 UTC