Having a problem with freemarker output...
[#assign optionsHTML = ""]
[#list data as item]
[#assign optionsHTML = optionsHTML + '<option value="' + item.value +'>'+ item.label + '</option>' /]
[/#list]
so, if I do
<select>
${iptionsHTML}
</select>
the output from otions get html entities instead of actual html.... so
<option value=" .....
even if I do
[#assign optionsHTML = ""]
[#list data as item]
[#noescape]
[#assign optionsHTML = optionsHTML + '<option value="' + item.value +'>'+ item.label + '</option>' /]
[/#noescape]
[/#list]
tried even
<select>
${iptionsHTML?html}
</select>
but's even worse :(
So after trying stuff, I don't know what I've done wrong before, but clean, this way is working
[#assign optionsHTML = ""]
[#list data as item]
[#assign optionsHTML = optionsHTML + '<option value="' + item.value +'>'+ item.label + '</option>' /]
[/#list]
<select>
[#noescape]
${optionsHTML}
[/#noescape]
</select>