function Templater(text) {
  return new Function('data', 'var output=' + JSON.stringify(text).replace(/<%=(.+?)%>/g, '"+($1)+"').replace(/<%(.+?)%>/g, '";$1\noutput+="') + ';return output;');
}
Templating function that renders HTML templates.
@function
@param {string} text - HTML text to be evaluated.
@returns {string} Rendered template with injected data.