title: How to convert plain text to html in Freemarker
body: <p>I have freemarker template as below .</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;title&gt;My Blog&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
  
  &lt;#if username??&gt;
  Welcome ${username} &lt;a href="/logout"&gt;Logout&lt;/a&gt; | &lt;a href="/newpost"&gt;New Post&lt;/a&gt;
  
  &lt;p&gt;
  &lt;/#if&gt;
  
  &lt;h1&gt;My Blog&lt;/h1&gt;
  
  &lt;#list myposts as post&gt;
  &lt;h2&gt;&lt;a href="/post/${post["permalink"]}"&gt;${post["title"]}&lt;/a&gt;&lt;/h2&gt;
  Posted ${post["date"]?datetime} &lt;i&gt;By ${post["author"]}&lt;/i&gt;&lt;br&gt;
  Comments:
  &lt;#if post["comments"]??&gt;
      &lt;#assign numComments = post["comments"]?size&gt;
          &lt;#else&gt;
              &lt;#assign numComments = 0&gt;
  &lt;/#if&gt;
  
  &lt;a href="/post/${post["permalink"]}"&gt;${numComments}&lt;/a&gt;
  &lt;hr&gt;
  
  ${post["body"]!""}
  &lt;p&gt;
  
  &lt;p&gt;
      &lt;em&gt;Filed Under&lt;/em&gt;:
      &lt;#if post["tags"]??&gt;
          &lt;#list post["tags"] as tag&gt;
              &lt;a href="/tag/${tag}"&gt;${tag}&lt;/a&gt;
          &lt;/#list&gt;
      &lt;/#if&gt;
  
  &lt;p&gt;
  &lt;/#list&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Where   ${post["body"]!""} represents body of my blog and display.</p>
  
  <p>My question : How to represent body tag as html content.</p>
  
  <p>Example : if body has table string </p>
  
  <pre><code>&lt;TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""&gt; ... " , 
  </code></pre>
  
  <p>then blog also represent same.</p>
  
  <p>How to convert this string to html table.<code>enter code here</code></p>
  
  <p>Note: body may also have anything (dynamic) and body is not fixed one.</p>