POC on jquery-tmpl bug#134
https://github.com/jquery/jquery-tmpl/issues/134
HTML
<div class="results"></div>
<div class="resultsWorkAround"></div>
<script id="testTemplate" type="text/x-jquery-tmpl">
${$data},
</script>
<script id="testTemplateWorkAround" type="text/x-jquery-tmpl">
${$data}${", "}
</script>
<script type='text/javascript' src='http://code.jquery.com/jquery-1.6.2.js'></script>
<script type='text/javascript' src="http://ajax.aspnetcdn.com/ajax/jquery.templates/beta1/jquery.tmpl.min.js"></script>
JavaScript
$(function() {
var data = ["john", "doe", "is", "unknown"];
$("#testTemplate").tmpl(data).appendTo($(".results"));
$("#testTemplateWorkAround").tmpl(data).appendTo($(".resultsWorkAround"));
});