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

Re: tidy eats <OPTION>text</OPTION>

From: Dave Raggett <dsr@w3.org>
Date: Mon, 18 Oct 1999 16:59:53 +0100 (GMT Daylight Time)
To: ldcousin@mmm.com
cc: html-tidy@w3.org
Message-ID: <Pine.WNT.4.10.9910181656580.900-100000@OEMCOMPUTER>

p.s. the problem was introduced recently when I added the
InsertMisc call into ParseText(). The fix is to insert
the following code snippet after the call to InsertMisc:

        /* deal with comments etc. */
        if (InsertMisc(field, node))
            continue;

        /* insert text value into option element */
        if (node->type == TextNode)
        {
            /* only called for 1st child */
            if (field->content == null && !(mode & Preformatted))
                TrimTrailingSpace(lexer, field->last);

            if (node->start >= node->end)
            {
                FreeNode(node);
                continue;
            }

            InsertNode(field, node);
            continue;
        }

        if (node->tag == tag_font)
        {
            ReportWarning(lexer, field, node,
                           DISCARDING_UNEXPECTED);
            FreeNode(node);
            continue;
        }



Regards,

-- Dave Raggett <dsr@w3.org> http://www.w3.org/People/Raggett
phone: +44 122 578 2984 (or 2521) +44 385 320 444 (gsm mobile)
World Wide Web Consortium (on assignment from HP Labs)
Received on Monday, 18 October 1999 11:58:31 GMT

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