Javascript Function Block Example:
var template = "<script>\n" +
" function updateSettings() {\n" +
" alert('test');\n" +
" }\n" +
"</script>";
qie.evaluateTemplate(template, parameters);
Bad Result:
<script>
function updateSettings()
</script>
Solution - Use numeric character references:
var template = "<script>\n" +
" function updateSettings() {\n" +
" alert('test');\n" +
" }\n" +
"</script>";
qie.evaluateTemplate(template, parameters);
Good Result:
<script>
function updateSettings() {
alert('test');
}
</script>