RE: Problem with INPUT tags

Yes I understand .. If you use the "output-xhtml: yes" option it should
(and does) produce compliant XHTML.

Your problem is how Tidy decides where to close the tag.  I agree it
should just add a trailing slash to an <input> tag resulting in <input
id="x"/> as I can't really see any valid reason to have any data within
<input></input> tags.  This is exactly what it does with <img> tags
quite successfully.

I have had similar (and harder to solve) problems with things like
unclose <marquee> tags (ugh!, not my content!)... Because a marquee tag
expects data between the <marquee> and </marquee> tags, sometimes tidy
decides to close it way down the page resulting in a whole page
scrolling marquee :)  Because IE arbitrarily ends the marquee when it
encounters another tag like a </td> the invalid document displays fine
before tidying, but looks terrible after.

The same problem can occur with many other unclosed tags in bad HTML
like <strong> etc.  There is no easy solutions for these ones, as who
can say what the author really intended, but tags like <input> should be
easily solved.

Cheers
Ben



-----Original Message-----
From: BLANC Cedric - LYO ( CeBlanc@lyon-partdieu.sema.slb.com )
[mailto:CeBlanc@lyon-partdieu.sema.slb.com] 
Sent: Wednesday, 9 April 2003 5:41 PM
To: Ben Noblet
Subject: RE: Problem with INPUT tags


The perfect solution would be that Tidy produces XHTML from my HTML
input file, because the org.w3c.dom.Document produced is manipulated
with DOM4J afterwards... That's why every tag has to be closed
correctly.

Cheers
Cedric

-----Message d'origine-----
De : Ben Noblet [mailto:ben@lateralsystems.com.au]
Envoye : mercredi 9 avril 2003 02:33
A : html-tidy@w3.org
Objet : RE: Problem with INPUT tags



Sorry I had assumed you were tidying to XHTML as that is primarily what
I use tidy for!

I presume Cedric was also tidying to XHTML, so you would also have to do
that to reproduce his problem.

Cheers
Ben


-----Original Message-----
From: Bjoern Hoehrmann [mailto:derhoermi@gmx.net] 
Sent: Wednesday, 9 April 2003 10:14 AM
To: Ben Noblet
Cc: html-tidy@w3.org
Subject: Re: Problem with INPUT tags


* Ben Noblet wrote:
>> I am unable to reproduce this, maybe this is caused by other errors
>> or
>
>> your configuration options? Using the latest JTidy available I get

>Your output is invalid as the INPUT tag is not closed.

For HTML output, the <input> element must not have an end tag, for XHTML
output, Tidy will print <input ... />; choosing XHTML output does not
cause the behaivour you describe.

Received on Wednesday, 9 April 2003 04:10:42 UTC