title: How to send parameter via ajax in Springmvc that have special characters
body: <p>I use <code>springmvc</code> and <code>tinymce</code> editor. I want to send content of editor as a parameter via ajax. this content may be have special characters. if it have special char content broken. 
  1) why the content that have special char don't send completely?<code>(special char : %,&gt;,&lt;,&amp;)</code> </p>
  
  <pre><code> &lt;script  type='text/javascript'&gt;
   $(document).ready(function() {
   $("#addStep").click(function(){
   var content = tinyMCE.get("content");
   var dataString = 'content='+ content.getContent();
  
  
  $.ajax({
  type: "post",
  url: "addStep.htm",
  data: dataString,
  cache: false,
  </code></pre>
  
  <p>success: function(response)
       {</p>
  
  <pre><code>         if(response.status == "SUCCESS"){ 
              //--------------
           }
  
      });
      });
  </code></pre>
  
  <p> </p>
  
  <p>and my controller</p>
  
  <pre><code> @RequestMapping(value="/addStep.htm",method=RequestMethod.POST)
   public @ResponseBody JsonResponse addStep(@ModelAttribute(value="answer") Answer   answer,BindingResult result,HttpSession session,HttpServletRequest request,ModelMap   model,@ModelAttribute("stepList") List&lt;String&gt; stepList){
      JsonResponse res = new JsonResponse();
      ValidationUtils.rejectIfEmpty(result, "content", "h");
      if(!result.hasErrors()){
          stepList.add(answer);
          res.setStatus("SUCCESS");
          res.setResult(stepList);
      }else{
          res.setStatus("FAIL");
          res.setResult(result.getAllErrors());
      }
      return res;
  }
  </code></pre>