title: Spring defaultHtmlEscape doesn't prevent xss attack
body: <p>I want to prevent xss attacks in my spring application.</p>
  <p>I added</p>
  <pre><code> &lt;context-param&gt;
          &lt;param-name&gt;defaultHtmlEscape&lt;/param-name&gt;
          &lt;param-value&gt;true&lt;/param-value&gt;
    &lt;/context-param&gt;
  </code></pre>
  <p>into my web.xml (I found this soulution <a href="https://stackoverflow.com/q/2147958/2674303">here</a>)</p>
  <p>but on my page I save content with name <code>&lt;script&gt;alert(1);&lt;/script&gt;</code> and this scripts executes after page refresh.</p>
  <p>client side code:</p>
  <pre><code>$.ajax({
         type: 'POST',
         url: 'setContentName',
         dataType: 'json',
         data: {contentId: id, name: params.value}
  });
  </code></pre>
  <p>What do I wrong?</p>
  <h2>P.S.</h2>
  <p>I load content using javascript after refresh</p>