Loading ...
Sorry, an error occurred while loading the content.

2143Remove HTML comments

Expand Messages
  • tenu@sci.fi
    Nov 1, 2001
    • 0 Attachment
      Here's a quick clip I just made for removing comments from HTML
      file (over-commented webstats), it might be of use for some of
      you.


      Warning!

      This will also strip all scripts and style declarations, so
      be careful with it.

      ---------------------------------------
      ^!SetScreenUpdate 0
      ^!Jump TEXT_START
      :loop
      ^!Find "<!--" S
      ^!IfError End
      ^!Set %start%=^$GetRowStart$:^$GetColStart$
      ^!Find "-->" S
      ^!IfError End
      ^!Jump SELECT_END
      ^!SelectTo ^%start%
      ^!InsertText ""
      ^!GoTo loop
      ---------------------------------------


      Jorma