Tidy ASP bugfix

Hi again, Dave --

Thanks so much for adding ASP-handling into Tidy -- this is greatly
appreciated. Also thanks for the forced-uppercase on attribute names. I love
the config file option.

I was testing the new version yesterday and noticed that it's still moving
ASP blocks inside of <HTML> and/or <BODY>. 

I dug into the source and determined that adding a check for:

  node->type == AspTag 

after line 2674 of parser.c, within:

  Node *ParseDocument(Lexer *lexer) 

fixes this.

Here's the original code: 

        if (node->type == CommentTag ||
            node->type == ProcInsTag ||
            node->type == DocTypeTag)
        {
            InsertNode(document, node);
            continue;
        }

And the fix: 

        if (node->type == CommentTag ||
            node->type == ProcInsTag ||
            node->type == DocTypeTag ||
            node->type == AspTag) /* check for ASP code */
        {
            InsertNode(document, node);
            continue;
        }

Hopefully it won't introduce any other problems.

Keep up the great work; this is a great resource to the Web community as we
strive for perfection in our pages.

______________________
Stuart Updegrave
Web Developer, msdn online
a-supde@microsoft.com
425.703.2255 x13790

Received on Tuesday, 13 April 1999 18:38:41 UTC