Question about tidy

hao liu <[email protected]>
Newsgroups gmane.comp.web.html-tidy.user,gmane.comp.web.html-tidy.devel
Message-ID <[email protected]>
Dear Sir,

I’m a new learner of tidy. My work is cleaning up and fixing security issues of the website. So when I meet tidy, I have to say its functions and feathers of tidy is really great, it help me a lot.I just have two questions, may be it looks naive.

1. I have a website folder.. It contains 30s html files, I use the command to clean all the html in the folder : ./tidy -f error.log *.html

So tidy can scan all the html files, generate error.log file and output all the log information into it.

It print like

line 1 column 1 - Warning: missing <!DOCTYPE> declaration…

….

.....

10 warnings, 0 errors were found!

line 1 column 1 - Warning: missing <!DOCTYPE> declaration…

..........

.....

10 warnings, 0 errors were found!

It prints each html page’s error info one by one, but don’t separate them by html page name. I don’t know which error info is from which html file. How can I solve this problem? Thanks very much.

2. I want to add google analytics code in my web site, so it needs to append some javascript code at the end of each webpage. I know that Tidy can generate a parser tree based on old html code and then print clean html code, can I change the source code of tidy and append js code to html? I have read the source code of tidy, there are so many c files in the tidy src directory. I know some file is used to clean, some for parse, but I don’t know which c file I should change to add the appending function. Can you give me some instruction?

Many thanks!

Best,

Hao

----------
雅虎邮箱,您的终生邮箱!
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.