[yunqa.de] Re: DIHTMLParser and msdn

  • From: "Rael Bauer" <rael.bauer@xxxxxxxxx>
  • To: yunqa@xxxxxxxxxxxxx
  • Date: Sun, 26 Oct 2008 19:41:10 +0200

Thanks for the example.

Now I've tried to add the relevant parts of this code to the WebDownload
example - so that the source page should be saved without <script> tags and
onclick attributes:

1. I add an Event plugin component, hook to parser and add HtmltagEvent with
your code.
2. Just before call to DIHtmlParser1.ParseAll; (around line 290) I add
following 4 lines:

  DIHtmlWriterPlugin1.SetAllFilters(fiShow); // Show all  ...
  DIHtmlWriterPlugin1.FilterScripts := fiHide; // but hide script contents.
  DIHTMLWriterPlugin1.HtmlTagFilters := tditagfilters.Create;
  DIHtmlWriterPlugin1.HtmlTagFilters.SetStartEnd(TAG_SCRIPT_ID, fiHide);

However expected removals do not occur..

What's wrong?

Rael

Other related posts: