Hi!!!
I'm needing to change a "very simple" behavior of an opensource C based software, but I haven't any experience on C language.
Ok man, let's go!
The program is "HTML Tidy" and you can obtain the source code
and reference material respectively at:
- http://tidy.sourceforge.net/src/tidy_src.tgz
- http://tidy.sourceforge.net
This is a great program to tidy and format your dirty html.
The problem is that it doesn't work if it encounter unknown elements(tags)
in html. Then you must declare these unknown
elements(tags) for properly works, what isn't a good idea in our XML days.
obs: there is a file called "parser.c" at src dir, might the solution is there. Piece of code extracted from it ....
Thus I need help to suppress this unwanted behavior, making it accept anyCode:/* ignore unknown start/end tags */ if ( node->tag == NULL ) { ReportWarning( doc, element, node, DISCARDING_UNEXPECTED ); FreeNode( doc, node ); continue; }
unknown elements(tags).
I believe that isn't hard to change the piece of code to accomplish it, but
as I said, I'm ignorant in the C world.
Can you understand me???
Thanks in advance,
marcoBR
btw, sorry 4 my english...