W3C home > Mailing lists > Public > html-tidy@w3.org > October to December 2005

Fwd: Re: HTML TIDY is adding unwanted code

From: laral4 <laral4@yahoo.com>
Date: Fri, 30 Sep 2005 14:36:33 -0700 (PDT)
Message-ID: <20050930213633.61666.qmail@web32715.mail.mud.yahoo.com>
To: html-tidy@w3.org

Can someone please answer this? Thanks.

> 
> On Thu, 22 Sep 2005, laral4 wrote:
> 
> > Hi Dave,
> >
> > I just started using your cool program, HTML TIDY,
> > recently. I read the configuration options
> thoroughly
> > and created a config file to use. I've attached it
> to
> > this message.
> >
> > A problem I'm having is that it is adding HTML
> tags
> > that are altering the look and functionality of my
> > code. It is taking something like this:
> >
> > <ul>
> > .
> > .
> > .
> >    <li>Title 1
> >        <ul>
> >            <li>Item 1</li>
> >            <ul>
> >                <li>Item a</li>
> >                <li>Item b</li>
> >            </ul>
> >        </ul>
> >    </li>
> > .
> > .
> > .
> > </ul>
> >
> > and converting it to this:
> >
> > <ul>
> > .
> > .
> > .
> >    <li>Title 1
> >
> >        <ul>
> >            <li>Item 1</li>
> >
> >            <li style="list-style: none">
> >                <ul>
> >                    <li>Item a</li>
> >
> >                    <li>Item b</li>
> >                </ul>
> >            </li>
> >        </ul>
> >    </li>
> > .
> > .
> > .
> > </ul>
> >

So this:

# Title 1
    * Item 1
          o Item a
          o Item b

now looks like this:

# Title 1
    * Item 1
    
          o Item a
          o Item b

Is there any switch that will allow me to retain 
the
original code without this additional enclosing 
li.

BTW the reason I want to do it this way is 
because I
am using listCollapse.js
(http://www.howtocreate.co.uk/tutorials/jsexamples/listCollapseExample.html)
which makes a list item, that encloses a ul 
within its
structure, into a collapsible object. The 
additional
enclosing li adds another level of collapsing 
that I
don't want.

config file:

> DocType: omit 
> fix-backslash: no 
> fix-bad-comments: no 
> join-styles: no 
> output-html: yes 
> quote-ampersand: no 
> indent: auto 
> indent-spaces: 4 
> markup: yes 
> tab-size: 4 
> wrap: 0 
> wrap-asp: no 
> wrap-sections: no 
> ascii-chars: no 
> force-output: no 
> keep-time: yes



> 
> As you can see I am catching up with email after a
> short vacation.
> 
> Tidy is fixing errors in your markup so that it
> matches the
> HTML specification for lists. Essentially the ul
> element can
> only have li elements as its children. The style
> attrbute is
> an attempt to keep the same rendering as the illegal
> markup,
> using a rule of thumb and I believe there is an
> option to
> turn that rule off, but can't remember the details
> right now.
> Others on the html-tidy list should be able to help.
> 
> - -- 
>   Dave Raggett <dsr@w3.org>  W3C lead for multimodal
> interaction
>   http://www.w3.org/People/Raggett +44 1225 866240
> (or 867351)
> 
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.4 (GNU/Linux)
> 
>
iD8DBQFDPXdQb3AdEmxAsUsRApX+AKCHI1ndQnPijVOzOnctcTpXYchVTgCg7Trl
> JFpmxvpWW3bZ5Hx4crt+XXo=
> =inya
> -----END PGP SIGNATURE-----
> 



		
__________________________________ 
Yahoo! Mail - PC Magazine Editors' Choice 2005 
http://mail.yahoo.com
Received on Saturday, 1 October 2005 02:27:05 GMT

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