title: Output encoding for special characters like !"#
body: <p>In spring framework we have something like below to escape html characters</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>I also want to add a custom class which can also escape characters like</p>
  
  <pre><code>!"#$%&amp;*+/:;=?@[]^`{|}~\
  </code></pre>
  
  <p>is there a class in Spring framework to do this?(I think, NO) If not, I can have utility class which can convert all the characters.</p>
  
  <p>Used the utility class like a filter to encode the values(input validation)</p>
  
  <p>I want to know If I can use the same filter to encode for output as well?
  issue is output still shows the same as entered value instead of encoding like <code>&amp;amp;LT;</code> for <code>&lt;</code>. Any suggestions are greatly appreciated!</p>