You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is in fact a feature, documented at the JavaScript Inlining section in the tutorials.
The aim of it is to provide a way to create JavaScript code that can be executed both statically (without executing Thymeleaf) and dynamically (after processing a template with Thymeleaf). That way:
var expr = /*[[#{ OGNL EXPR }]]*/ 'This is my static expression!';
messages.push(expr);
The above code is perfectly correct JavaScript that can be executed statically. And when the template is processed, you will get:
var expr = 'AN STR';
messages.push(expr);
Nevertheless, I'm open to suggestions for new/better ways to do this (always maintaining backwards compatibility) for Thymeleaf 2.1.
The inline javascript removes javascript code up to 1st ;
Example;
Will output:
Note that Thymeleaf removed ) that result in a not valid javascript expression.
Regards
Enrique
The text was updated successfully, but these errors were encountered: