16Mar/090
Hardcore code validation
private bool IsCleaned(string untrustedText)
{
System.Text.ASCIIEncoding encoding =new System.Text.ASCIIEncoding();
bool iscleaned = false;
foreach (byte chunk in encoding.GetBytes(untrustedText)) {
// 60 = < | 62 = > |45 = - | 39 = '
if ((chunk == 60) || (chunk == 62) || (chunk == 45) || (chunk == 39)) {
iscleaned = false;
break;
}
else { iscleaned = true; }
}
return iscleaned;
}