I have a template that looks like the following:
<img src="${thumb}" alt="${name}" />
When I use this template passing both a thumb (string) and a name (string), it ends up generating the following HTML:
<img alt="small" src="$%7Bthumb%7D">
I tested to make sure that 'thumb' was being passed in by trying the variable in a 'p' tag and it worked fine.
Browser: Firefox 3.6
OS: Mac OS X
Just tested in Chrome on OS X and it appears to be working correctly.
I found a workaround but I'll leave the issue here to discuss whether this should be happening or not.
The issue I was having was caused by having a string, converting to a jquery object, and then calling tmpl() on it:
Doing the following does work:
check the docs - two different fncs : .tmpl() and jQuery.tmpl()
the docs for .tmpl() state "Take the first element in the matched set and render its content as a template, using the specified data." - so you can't use it with a markup string (i think!): http://api.jquery.com/tmpl/