title: Checkmarx Java fix for Log Forging -sanitizing user input
body: <p>Can anyone suggest the proper sanitization/validation process required for the courseType variable in the following getCourses method. I am using that variable to write in a log file.</p>
  
  <p>I've tried HtmlUtils.HtmlEscape() but didn't get expected results.</p>
  
  <p>Thanks!</p>
  
  <pre><code>@RequestMapping(value = "/retriveCourses", method = RequestMethod.GET)
  @ResponseBody
  public List&lt;Course&gt; getCourses(@RequestParam(value = "courseType", required = false) String courseType) {
  
  }
  </code></pre>