<%
Private Function Censor(byVal string)
Const WordList = "C:\dirtywords.txt"
Dim objFSO, objFile, tmp, item, word, a, b, x, y, i, c, j
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile( WordList )
tmp = split( objFile.ReadAll(), vbCrLf )
objFile.Close
Set objFile = Nothing
Set objFSO = Nothing
x = split( string, " " )
for i = 0 to ubound(x)
a = x(i)
For each item in tmp
b = item
if cstr(trim(lcase(a))) = _
cstr(Trim(lcase(b))) then
c = Len(a)
a = ""
for j = 1 to c
a = a & "x"
next
a = a & "
"
exit for
end if
next
x(i) = a
next
Censor = Join( x, " " )
End Function
%>