BorisMoore / jquery-tmpl

The original official jQuery Templates plugin. This project was maintained by the jQuery team as an official jQuery plugin. It is no longer in active development, and has been superseded by JsRender.
3.23k stars 1.01k forks source link

Cannot use reserved words (eg, "class") as template variable names #152

Open bendavis78 opened 13 years ago

bendavis78 commented 13 years ago

Case in point ( http://jsfiddle.net/savid/Cu88v/ )

$(document).ready(function(){
    var myDiv = $('#mytmpl').tmpl({'class':'foo'}).appendTo($('body'));
});

In a recent version of Chrome (14.0.835.186), this raises the error: "Uncaught SyntaxError: Unexpected reserved word".

Obviously the workaround is simple, but debugging this problem is very difficult. It might help if the plugin raised a more informative error.

rdworth commented 13 years ago

Thanks for taking the time to submit this issue. Just wanted to let you know this plugin is no longer being actively developed or maintained by the jQuery team. See README for more info.