An inelegant solution to double quotes in input strings:
<SCRIPT LANGUAGE="JavaScript" RUNAT="SERVER">
//==================================================
//
// removeQuotes
//
//==================================================
function removeQuotes (str)
{
var temp = ""
var i
for (i = 0; i < str.length; i++)
{
ch = str.charAt(i)
if (ch != "\"")
{
temp = temp + ch
}
}
return temp
}
</SCRIPT>
An inelegant solution to all the characters that mess up URL's and SQL
statements:
<%
'==================================================
'
' RemoveBadCharacters
'
'==================================================
Function RemoveBadCharacters (ByVal str)
Dim temp1
Dim temp2
temp1 = Replace (str, "'", "`") ' single quote
temp2 = Replace (temp1, "|", "") ' OR
temp1 = Replace (temp2, "&", "") ' ampersand
temp2 = Replace (temp1, "+", "") ' plus
temp1 = Replace (temp2, "?", "") ' question mark
temp2 = removeQuotes(temp1) ' double quote
RemoveBadCharacters = temp2
End Function
%>
Bill Appledorf
billappledorf@usa.net
- - - - - - - - - - - - - - - - - - - - - -