Menu
Hi Guys,
I would like to have a script where users can not type in any metacharacters such as <>$%& in my form input. How do I go about doing this?
So, far this is all I have is a function call, but how would I execute the script?
Thanks ahead. ?
function RemoveBad(InStr){
InStr = InStr.replace(/<
InStr = InStr.replace(/>
InStr = InStr.replace(/”/g,””);
InStr = InStr.replace(/’/g,””);
InStr = InStr.replace(/%/g,””);
InStr = InStr.replace(/;/g,””);
InStr = InStr.replace(/(
InStr = InStr.replace(/)
InStr = InStr.replace(/&/g,””);
InStr = InStr.replace(/+
return InStr;
}