title: spring:escapeBody results in invalid JSON
body: <p>I am attempting to escape a string in a JSP to return valid JSON on an AJAX call however the spring:escapeBody tag is not correctly escaping single quotes for JSON. Valid JSON should not escape single quotes. </p>
  
  <pre><code>&lt;%@ page trimDirectiveWhitespaces="true" contentType="json/application"%&gt;
  &lt;%@ taglib prefix="spring" uri="http://www.springframework.org/tags"%&gt;
  {
  "status": "success",
  "body" : "&lt;spring:escapeBody javaScriptEscape="true"&gt; 
             if you don't have "user" an account
             &lt;/spring:escapeBody&gt;"
   }
  </code></pre>
  
  <p>so this code evaluates to:</p>
  
  <pre><code>{
  "status": "success",
  "body" : "if you don\'t have \"user\" an account"
   }
  </code></pre>
  
  <p>but valid JSON needs it to be:</p>
  
  <pre><code>{
  "status": "success",
  "body" : "if you don't have \"user\" an account"
   }
  </code></pre>
  
  <p>is there anyway I can not escape the single quote with the escapeBody tag? 
  Or is there another tag I can use? maybe a JSTL function?</p>