Closed hurelhuyag closed 9 months ago
In short:
<select name="category" required>
@for(var c : categories)
<option id="${c.getId()}" selected="${c.getId().equals(form.category())}">${c.getName()}</option>
@endfor
</select>
JTE has some idea of context to perform HTML sanitisation if necessary. That's why it doesn't allow interpolation at arbitrary html locations.
Why the above example works -> https://jte.gg/html-rendering/?h=smart#smart-attributes
This is my usual selected attribute printing technique. But JTE doesn't allow me to do it. Why it is not allowed?. Is there any other recommended way?
error output: