title: Thymeleaf th:inline="javascript" issue
body: <p>I don't know how to solve the following: I'd like to let my Model generate real javascript dynamically based on some model logic.</p>
  
  <p>This final piece of javascript code then should be added inside the <em>$(document).ready { }</em> part of my html page.</p>
  
  <p>The thing is: If I use inline="javascript", the code gets quoted as my getter is a String (that is how it is mentioned in the Thymeleaf doc but it's not what I need ;-)</p>
  
  <p>If I use inline="text" in is not quoted but all quotes are escaped instead ;-) - also nice but unusable 8)</p>
  
  <p>If I try inline="none" nothing happens.</p>
  
  <p>Here are the examples</p>
  
  <p>My model getter created the following Javascript code.</p>
  
  <p><strong>PageHelper class</strong></p>
  
  <pre><code>public String documentReady() {
  
  // do some database operations to get the numbers 8,5,3,2
  return "PhotoGallery.load(8,5,3,2).loadTheme(name='basic')";
  
  }
  </code></pre>
  
  <p>So if I now try <strong>inline="javascript"</strong></p>
  
  <pre><code>&lt;script th:inline="javascript"&gt;
  /*&lt;![CDATA[*/
      jQuery().ready(function(){
          /*[[${pageHelper.documentReady}]]*/
      });
  /*]]&gt;*/
  &lt;/script&gt;
  </code></pre>
  
  <p>it will be rendered to</p>
  
  <pre><code>&lt;script&gt;
  /*&lt;![CDATA[*/
      jQuery().ready(function(){
          'PhotoGallery.load(8,5,3,2).loadTheme(name=\'basic\')'
      });
  /*]]&gt;*/
  &lt;/script&gt;
  </code></pre>
  
  <p>Which doesn't help as it is a String literal, nothing more (this is how Thymeleaf deals with it).</p>
  
  <p>So if I try <strong>inline="text"</strong> instead</p>
  
  <pre><code>&lt;script&gt;
  /*&lt;![CDATA[*/
      jQuery().ready(function(){
          PhotoGallery.load(8,5,3,2).loadTheme(name=&amp;#39;basic&amp;#39;)
      });
  /*]]&gt;*/
  &lt;/script&gt;
  </code></pre>
  
  <p>Which escapes the quotes.</p>
  
  <p><strong>inline="none"</strong> I do not really understand, as it does nothing</p>
  
  <pre><code>&lt;script&gt;
  /*&lt;![CDATA[*/
      jQuery().ready(function(){
          [[${pageHelper.documentReady}]]
      });
  /*]]&gt;*/
  &lt;/script&gt;
  </code></pre>
  
  <p>To be honest I have no idea how to solve this issue and hopefully anybody out there knows how to deal with this.</p>
  
  <p>Many thanks in advance
  Cheers
  John</p>