28 ms·
The 80% case: var render = function(src, data) { return src.replace(/{{(.*?)}}/g, function(w, p) { return data[p]; }); };
by rabidsnail 14y ago
The 80% case:
var render = function(src, data) {
return src.replace(/{{(.*?)}}/g, function(w, p) {
return data[p];
});
};
- rauar 14y agoThis is the 0% case. No escaping and therefore not safe w.r.t. XSS attacks.