ASP HTML code to turn secure ASCII code
function dotrimproperly (str, nnamedformat, properly, pointed, points)
Dim strret
strret = Server.HTMLEncode (str)
strret = replace (Strret, vbCrLf, "<br>")
strret = replace (strret, vbtab, "")
if (LEN (strret) > Nnamedformat) Then
Strret = Left (strret, Nnamedformat)
if (properly = 1) Then
Dim Temparray
Temparray = Split (Strret, "")
Dim N
strret = ""
For n = 0 to Ubound (temparray)-1
strret = strret & "" & Temparray (N)
Next
End If
if (pointed = 1) Then
strret = strret & Points
End If
End If
Dotrimproperly = strret
End Function
' Function formatstr (String)
' On Error Resume Next
' String = Replace (String, CHR (13), "")
' String = Replace (String, ' < ', ' < ')
' String = Replace (String, ' > ', ' > ')
' String = Replace (String, CHR (a) & CHR (a), ' <BR><BR> ')
' String = Replace (String, CHR (Ten), ' <BR> ')
' Formatstr = String
' End Function
Function Formatstr (String)
On Error Resume Next
String = Replace (String, "", " ")
String = Replace (String, CHR (), " ")
String = Replace (String, CHR (a) & CHR (a), "<BR><BR>")
String = Replace (String, CHR (a), "<BR>")
' String = Replace (String, ' < ', ' < ')
' String = Replace (String, ' > ', ' > ')
Formatstr = String
End Function