Browse Source

Try/catch input sanitization

master
Gregory Rudolph 3 years ago
parent
commit
d2d9079d55
Signed by: rudi
GPG Key ID: EF64F3CBD1A1EBDD
  1. 8
      Posting.cs

8
Posting.cs

@ -83,8 +83,12 @@ public class Posting @@ -83,8 +83,12 @@ public class Posting
}
i++;
}
Regex boxRegex = new Regex(@"(Box \d+)");
this.BoxNumber = boxRegex.Matches(this.NotesOnApplying)[0].Value.Replace("Box ", "");
try
{
Regex boxRegex = new Regex(@"(Box \d+)");
this.BoxNumber = boxRegex.Matches(this.NotesOnApplying)[0].Value.Replace("Box ", "");
}
catch (Exception) { }
this.BargainingUnit = this.BargainingUnit.Replace("&", "&");
this.VacancyID = id;
}

Loading…
Cancel
Save