title: Thymeleaf template not working with inline JS
body: <p>I'm hitting a problem when I want to extract my function to a script inside html. If its written like this it works: </p>
  
  <pre><code>&lt;input type="text" id="myInput" 
          onkeypress="return confirm('Are you sure you want to delete this item?');"
          placeholder="Search for manufacturers.." /&gt;
  </code></pre>
  
  <p>But if I try to make it as a function inside script like this, it just doesn't execute: </p>
  
  <pre><code>&lt;input type="text" id="myInput" 
          onkeypress="myFunction()"
          placeholder="Search for manufacturers.." /&gt;
  </code></pre>
  
  <p>Function:</p>
  
  <pre><code>&lt;script th:inline="javascript"&gt;
  /*&lt;![CDATA[*/
      function myFunction() {
      alert("You pressed a key inside the input field");
  /*]]&gt;*/
  &lt;/script&gt;
  </code></pre>