This commit is contained in:
Ryan McGrath 2011-06-23 03:08:14 +09:00
parent f7d1e19ddf
commit 080acb34d4

View file

@ -204,7 +204,7 @@
* @returns String, parsed/replaced template. * @returns String, parsed/replaced template.
*/ */
render: function(template, context) { render: function(template, context) {
for(x in context) template = template.replace(new RegExp('{{' + x + '}}', 'g'), context[x].replace('<', '&lt;').replace('>', '&gt;')); for(x in context) template = template.replace(new RegExp('{{' + x + '}}', 'g'), context[x].replace(/</g, '&lt;').replace(/>/, '&gt;'));
return template; return template;
} }
}; };