title: freemarker replace & and &amp;
body: <p>I have a problem with Freemarker.
  I want to remove all the special characters from this sentence, and also some similar sentences in the future:</p>
  
  <blockquote>
    <p>BLA BLA RANDOM  &amp;, RANDOM BLA</p>
  </blockquote>
  
  <p>In particular, the &amp;, but the platform also uses HTML, so with the below code:</p>
  
  <pre><code>&gt; &lt;#assign text1 = name?replace("[^a-zA-Z0-9. ]", "",'r')&gt;
  &gt;${text1}
  </code></pre>
  
  <p>I get:</p>
  
  <blockquote>
    <p>BLA BLA RANDOM  amp RANDOM BLA</p>
  </blockquote>
  
  <p>i'm trying also something like this that it remove the &amp;amp but how do i add also some special like !@#$%^90 to be removed in case will be in there?</p>
  
  <pre><code>&gt; &lt;#assign text1 = name?replace('&amp;amp;,', '')&gt;
  </code></pre>