Stripping an HTML File Before Uploading

Corl asked how to strip down an html file before uploading with notetab. His theory is that he doesn’t need comments on his remote copy and spaces and tabs and so forth for clear readability actually slow up/downloading and take unneccesary bandwidth. I suppose in a sense he’s right and so long as you keep your original copy … you can upload the stripped copy.

Here is a clip to do it:
;clip for Corl to strip down html files
;whacked at by don at htmlfixit dot com
;dated 03/09/2007
;copy online at:
;following line should remove all comments in html document
^!Replace "<!-- .* -->" >> "" ACIWRS
;should remove all returns
^!Replace "^P" >> "" ACIWS
;should remove all tabs
^!Replace "^T" >> "" ACIWS
;should remove all double spaces
^!Replace "\s+" >> " " ACIWRS
;should replace all > < with ><
^!Replace "> <" >> "><" ACIWS

Leave a Reply

Recent Posts