HTML to XHTML allowing control characters

"Jason Millard" <[email protected]> Wed, 17 Oct 2007 09:16:13 -0400
Newsgroups gmane.comp.web.html-tidy.devel
Message-ID <[email protected]>
Hello.

I am trying to parse some HTML into XHTML. The HTML contains some
control-H characters in an input tag. This is used for authentication
purposes.

During a Tidy conversion the control-H character gets lost.

In streamio.c there is the following:

       if ( c < 32 )
           continue; /* discard control char */

Directly above that:

       /* Form Feed is allowed in HTML */
       if ( c == '\015' && !cfgBool(in->doc, TidyXmlTags) )

To allow the control-H to get through I used:

       if ( (c == '\015' || c == '\010') && !cfgBool(in->doc, TidyXmlTags) )

Instead of allowing just Form Feeds, what are thoughts on adding a
generic configuration option to allow all control characters?

Thanks,
-- Jason

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/