Try/catch input sanitization

This commit is contained in:
2021-08-02 22:16:31 -04:00
parent 75f224d016
commit d2d9079d55

View File

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