% 'this page strips all but the most basic tags out of a hopelessly bloated HTML page output by 'Microsoft Office 2000 'Gus Mueller 'December 9 1999 strTagsToKill="div,span,title,sub,link,link,meta,html,body,head,style,font,span,o,w,xml,!,!" arrTags=split(strTagsToKill, ",") if request("file")<>"" then strPath=request("file") set fso=CreateObject("scripting.filesystemobject") set filThis=fso.opentextfile(server.mappath(strPath), 1) strThis=filThis.readall filThis.close for intTags=0 to ubound(arrTags) strThis=tagdel(strThis, arrTags(intTags)) next strThis=pstrip(strThis) strThis=bstrip(strThis) strThis=istrip(strThis) strThis=spanstrip(strThis) strThis=slashpdel(strThis) 'a little extra processing strThis=replace(strThis, "( ", "(",1,-1,1) strThis=replace(strThis, " ", "",1,-1,1) strThis=replace(strThis, " )", ") ",1,-1,1) strThis=replace(strThis, " )", ") ",1,-1,1) strThis=replace(strThis, " ", " ",1,-1,1) strThis=replace(strThis, " ", " ",1,-1,1) strThis=replace(strThis, vbTab, " ",1,-1,1) strThis=replace(strThis, chr(160), " ",1,-1,1) strThis=demultiplespace(strThis) strThis=demultiple(strThis, chr(13) & chr(10)) set filThis=fso.opentextfile(server.mappath(strPath) & ".htm", 2, true) filThis.write(strThis) filThis.close end if %> <% function pstrip(byval strIn) if strIn<>"" then intPLocation=instr(1, strIn, "
", 1)+1 strIn=left(strIn, intPLocation-1) & "
" & mid(strIn, intPEndLocation) intPLocation=instr(2+intPLocation, strIn, "
"" then
intPLocation=instr(1, strIn, "", 1)+1
strIn=left(strIn, intPLocation-1) & "" & mid(strIn, intPEndLocation)
intPLocation=instr(2+intPLocation, strIn, """ then
intPLocation=instr(1, strIn, "", 1)+1
strIn=left(strIn, intPLocation-1) & "" & mid(strIn, intPEndLocation)
intPLocation=instr(2+intPLocation, strIn, """ then
intPLocation=instr(1, strIn, "", 1)+1
strIn=left(strIn, intPLocation-1) & "" & mid(strIn, intPEndLocation)
intPLocation=instr(2+intPLocation, strIn, """ then
intPLocation=instr(1, strIn, "