i have a jquery template:
<div id="test_template">
<img src="${url}" width="31" height="32" alt="" />
${url}
</div>
I compile it with this:
test_template = $( #test_template ).template();
I render it with this:
$.tmpl(test_template, {url: http://sstatic.net/stackoverflow/img/sprites.png }).appendTo( #render_test );
the end result is this:
<div id="render_test">
<img height="32" width="31" alt="" src="$%7Burl%7D"> http://sstatic.net/stackoverflow/img/sprites.png</div>
obviuosly I expected the URL to be in the src="" tag... but it is not (though it IS being outputted correctly after the tag). if I look at the anonymous function created by template(), I see that it isn t turning the src="${url}" into javascript. it is just encoding it as HTML and spitting it back out
what am I doing wrong?