W3C home > Mailing lists > Public > html-tidy@w3.org > April to June 2000

tidy13jan00 confused by IMG tags

From: Sebastian Lange <lange@cyperfection.de>
Date: Fri, 28 Apr 2000 11:35:23 +0200
Message-Id: <4.3.1.2.20000428101009.00b60780@pop3.cyperfection.de>
To: html-tidy@w3.org
I am calling 13-Jan-2000 Tidy from within a script, to tidy up HTML code 
"on the fly". As I have mentioned before (19 Apr 2000), Tidy apparently 
chokes on EMTPY ALT attributes, unless the appear at the end of the IMG tag.

I might be wrong, but aren't empty attributes legal HTML? At least they are 
commonly used, so I believe that Tidy should learn to deal better with this.

A simplified example:

== == == == == == == == == == == == ==
Original)
<IMG SRC="/images/test.gif"><BR>
<IMG SRC="/images/test.gif" ALT=""><BR>
<IMG ALT="" SRC="/images/test.gif"><BR>

1st Tidy)
     <IMG ALT="" SRC="/images/test.gif"><BR>
     <IMG SRC="/images/test.gif" ALT=""><BR>
     <IMG ALT="SRC=/images/test.gif"><BR>

recursive 2nd Tidy)
     <IMG ALT="SRC=/images/test.gif"><BR>

     <P> <IMG SRC="/images/test.gif" ALT=""><BR>
      <IMG ALT="SRC=/images/test.gif"><BR>
     </P>
== == == == == == == == == == == == ==

Here are the tidy configuration directives:

tidy13jan00 -f /dev/null -quiet -latin1
	--wrap 0
	--wrap-attributes no
	--indent auto
	--tidy-mark no
	--uppercase-tags yes
	--uppercase-attributes yes
	--alt-text ''
	--doctype '-//W3C//DTD HTML 4.0 Transitional//EN'
	--quote-marks yes
	--enclose-text yes
== == == == == == == == == == == == ==

I have looked into the C source, but am not firm enough with it to point 
out the problem. Can anybody please help?


Thanks a lot!

sebastian
Received on Friday, 28 April 2000 05:33:42 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 3 April 2012 06:13:43 GMT