title: Evaluate String from database in taglib in Grails
body: <p>I have a taglib method and I fetch an object from database with string expressions to evaluate. From the docs, it should be possible to do sth like this:</p>
  
  <pre><code>out &lt;&lt; "&lt;div id=\"${attrs.book.id}\"&gt;"
  </code></pre>
  
  <p>But when I try to do the same for the object fetched from database, the expression between ${} does not get evaluated. I realized that the reason is because I have a String, so I tried to convert it to GString, but without any success.</p>
  
  <pre><code>// objectFromDb.content = "&lt;div id=\"${attrs.book.id}\"&gt;"
  def objectFromDb = fetchObjectFromDb()
  def gStringExpression = "${objectFromDb.getContent()}"
  out &lt;&lt; gStringExpression
  </code></pre>
  
  <p>How can I achieve the evaluation of the expression inside the taglib? I want to have different variables for each object, so to use TemplateEngine is not possible as I don't know which variables will be used.</p>