taskrabbit/sudojs — pull request #7 by mnelson (2014-01-15 15:29:59+00:00)
Title: Allow for a raw content interpolation

Raw interpolation is defaulted to `{{{= content }}}`. I'm open to other delimiters but chose this to be consistent with mustache / handlebars and still consistent with the interpolation syntax used in sudo.

This is useful if you have a view which pre-processes content and generates html.

Example:

```js
// in your view

urlRegex: /\(?\b(https?://|www.)([-A-Za-z0-9+(&)@#(/)%?=~_()|!:,.;]*[-A-Za-z0-9+(&)@#(/)%=~_()|])/g,

render: function render() {
this.model.set('linkedContent', this.linkify(this.model.get('content')));
this.$el.html(template(this.model.data));
},

linkify: function linkify(content) {
return sudo.escape(content).replace(this.urlRegex, '$1$2');
}

```

```html

{{=data.title}}

{{{=data.linkedContent}}}

```