W3C home > Mailing lists > Public > html-tidy@w3.org > July to September 2000

Re: Tidy putting spurious "/" into tags

From: Sebastian Lange <lange@cyperfection.de>
Date: Tue, 11 Jul 2000 10:47:17 +0200
Message-Id: <>
To: html-tidy@w3.org
Cc: trance@lightlink.com
Hello Terry,

Tidy is right about what it's doing - the input file does not appear to be 
valid XHTML 1.0.
I used the WDG Validator 
[http://www.htmlhelp.com/tools/validator/direct.html] because it allows 
direct HTML input, while the W3C Validator [http://validator.w3.org/] only 
allows URL and uploaded File validation, yet I believe them to be fairly 

Please see following snippets from the reference:

"Empty elements must either have an end tag or the start tag must end with 
/>. For instance, <br/> or <hr></hr>."

"Include a space before the trailing / and > of empty elements, e.g. <br 
/>, <hr /> and <img src="karen.jpg" alt="Karen" />. Also, use the minimized 
tag syntax for empty elements, e.g. <br />, as the alternative syntax 
<br></br> allowed by XML gives uncertain results in many existing user agents."

The output file ALMOST validates, the validator still complains about the 
I have mentioned this before, it would be a very nice addition if tidy 
would allow to suppress "illegal" attributes.


At 01:16 11.07.2000 -0700, Terry Teague wrote:
>Dear Folks,
>One of my users has reported a problem when tidying his XHTML on the Mac
>platform. I have since reproduced his problem with the Windows versions of
>Tidy, so this is a non-platform specific problem that I look to your advice
>I am able to reproduce the problem with both the 30 Apr 00 and 08 Jul 00
>Here is his original comment :
> >I'm evaluating BBTidy 1.0b6 on my Macintosh G3, OS 8.6. BBTidy for
> >BBedit consistently inserts " /" in a number of tags when tidying up
> >PageSpinner 2.1 for PPC files. I've attached my original file, the
> >output file, and my config file. I hope you can help me figure this
> >out, as I think your program is great and would like to use it on an
> >ongoing basis.
>Here is his config file :
>indent: auto
>indent-spaces: 2
>wrap: 72
>markup: yes
>clean: no
>output-xml: no
>input-xml: no
>show-warnings: yes
>numeric-entities: yes
>quote-marks: yes
>quote-nbsp: yes
>quote-ampersand: no
>break-before-br: no
>uppercase-tags: yes
>uppercase-attributes: yes
>smart-indent: no
>output-xhtml: yes
>char-encoding: latin1
>new-inline-tags: mind-it-ignore, /mind-it-ignore
>tidy-mark: no
>logical-emphasis: yes
>drop-empty-paras: no
>alt-text: image
>Here is a small portion of his input HTML ("index.shtml") that demonstrates
>the problem. The entire file can be provided on request :
><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
>     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
>And is is the tidied output of the above :
>See the trailing "/>" above.
>Regards, Terry

Sebastian Lange
Maybe the first chat site that validates as HTML
4.0 even though user input may contain HTML codes.

Courtesy to Dave Raggett's HTML Tidy:
Received on Tuesday, 11 July 2000 04:50:24 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:38:48 UTC