title: how encoding & decoding works in grails with decodeHTML & encodeAsHTML in grails?
body: <p>I am trying to understand how encoding &amp; decoding works in grails with decodeHTML &amp; encodeAsHTML</p>
  
  <p>// decode
  Example is </p>
  
  <pre><code>List symbols = ['!', '*', '/']
  symbols.each { String symbol -&gt;
      println symbol.decodeHTML()
  }
  </code></pre>
  
  <p>it should print  </p>
  
  <pre><code>&amp;#33;    // but it prints !
  &amp;#42;   // but it prints *
  &amp;#47;   // but it prints /
  </code></pre>
  
  <p>// encode Example is</p>
  
  <pre><code>List symbols = ['&amp;#33;', '&amp;#42;', '&amp;#47;']
  symbols.each { String symbol -&gt;
      println symbol.encodeAsHTML()
  }
  </code></pre>
  
  <p>it should print</p>
  
  <pre><code>'!'  // but it prints &amp;amp;#33;
  '*'  // but it prints &amp;amp;#42;
  '/'  // but it prints &amp;amp;#47;
  </code></pre>