title: How to add Script tag by inLine Script in Thymeleaf?
body: <p>I have written following code into Thymeleaf template to load jQuery from server if cdn link fail.</p>
  
  <pre><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;script&gt;
      window.jQuery || document.write('&lt;script src="js/vendor/jquery-3.2.1.min.js"&gt;&lt;\/script&gt;');
  &lt;/script&gt;
  </code></pre>
  
  <p>Thymeleaf is interpreting <code>document.write('&lt;script src="js/vendor/jquery-3.2.1.min.js"&gt;&lt;/script&gt;')</code> as script tag which should imterpret as a string.</p>
  
  <p>I'm getting following error near <code>&lt;\/script&gt;</code> tag.</p>
  
  <blockquote>
    <p>org.xml.sax.SAXParseException: The content of elements must consist of
    well-formed character data or markup.</p>
  </blockquote>
  
  <p>Any solution or work around for this problem?</p>
  
  <p>Thanks :)</p>