/*
Replace {{foo}} and friends with values from our view
function(template, context, partials, in_recursion) {
        // tit for tat
        var that = this;

        var tag_replace_callback = function(match, operator, name) {
            switch(operator) {
                case "!": // ignore comments
                    return "";
                case ">": // render partial
                    return that.render_partial(name, context, partials);
                case "{": // the triple mustache is unescaped
                    return that.find(name, context);
                default: // escape the value
                    return dom.escapeHTML(that.find(name, context));
            }
        };
        var lines = template.split("\n");
        for(var i = 0; i < lines.length; i++) {
            lines[i] = lines[i].replace(tagRegex, tag_replace_callback, this);
            if(!in_recursion) {
                this.send(lines[i]);
            }
        }

        if(in_recursion) {
            return lines.join("\n");
        }
    }