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

Tidy ASP bugfix

From: Stuart Updegrave (Wasser) <a-supde@microsoft.com>
Date: Tue, 13 Apr 1999 12:40:37 -0700
Message-ID: <5B3F16B2DB67D1119A0D00805F312AA20EA628E0@RED-MSG-58>
To: "'dsr@w3.org'" <dsr@w3.org>, "'html-tidy@w3.org'" <html-tidy@w3.org>
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);

And the fix: 

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

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
425.703.2255 x13790
Received on Tuesday, 13 April 1999 18:38:41 UTC

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