RE: eliminate <script> tags

Vipul Veera wrote:

> Where do i modify tidy so that the program strips everything between
> <script> and </script>

Tidy doesn't do that.  You'll have to do some pre or post-processing
yourself.

It might be nice if Tidy had an option like ...

	delete-elements: marquee, blink

but it opens up a can of worms.  For example, if you say ...

	delete-elements: p

does it delete the *contents* of all the paragraphs, or just "strip the
tags"?  (In the script example, you wanted the contents removed, but that
wouldn't necessarily always be the case).  And to make it useful, you'd also
have to be able to select by attribute ...

	delete-elements: div[class="foo"], span[class="bar"]

You can see that adding this option wouldn't quite be a 15-minute hack. :)
You can get what you want today by just piping Tidy's output to an XSLT
stylesheet, a Perl script, etc.

PS.  A "transform-elements" option would be awful nice too:

	transform-elements: p[class="foo"]/p[class="bar"], ...

Would save writing an awful lot of XSLT stylesheets, scripts, etc. ...


/Jelks

Received on Wednesday, 23 August 2000 00:53:47 UTC