code: function compileTemplate(str) {
      return new Function(
        tmpl.arg,
        "var _e=tmpl.encode" + tmpl.helper + ",_s='" +
          str.replace(tmpl.regexp, tmpl.func)
             .replace(/(<\/?)(script>)/, "$1' + '$2" ) +
          "';return _s;"
      );
    }
docs: From blueimp-tmpl/js/tmpl.js