<%
Option explicit
Function striphtml (strtext)
Dim arysplit, I, j, stroutput
Arysplit = Split (strtext, "<")
If Len (arysplit (0)> 0 then j = 1 else J = 0
For I = J to ubound (arysplit)
If instr (arysplit (I), ">") then
Arysplit (I) = mid (arysplit (I), instr (arysplit (I), ">") + 1)
Else
Arysplit (I) = "<" & arysplit (I)
End if
Next
Stroutput = join (arysplit ,"")
Stroutput = mid (stroutput, 2-j)
Stroutput = Replace (stroutput, ">", "> ")
Stroutput = Replace (stroutput, "<", "<")
Striphtml = stroutput
End Function
%>
<Form method = "Post" id = form1 name = form1>
<B> enter an HTML string: </B> <br>
<Textarea name = "txthtml" Cols = "50" rows = "8" Wrap = "virtual"> <% = request ("txthtml") %> </textarea>
<P>
<Input type = "Submit" value = "Strip HTML tags! "Id = submit1 name = submit1>
</Form>
<% If Len (Request ("txthtml")> 0 then %>
<P> <HR> <p>
<B> <u> View of string <I> with no </I> HTML stripping: </u> </B> <br>
<XMP>
<% = Request ("txthtml") %>
</XMP> <p>
<B> <u> View of string <I> with </I> HTML stripping: </u> </B> <br>
<PRE>
<% = Striphtml (Request ("txthtml") %>
</PRE>
<% End if %>