diff --git a/converse.js b/converse.js index 74e8e1afb..2624d3df9 100644 --- a/converse.js +++ b/converse.js @@ -17,6 +17,11 @@ 'burry.js/burry' ], function (Burry) { var store = new Burry.Store('collective.xmpp.chat'); + // Use Mustache style syntax for variable interpolation + _.templateSettings = { + evaluate : /\{\[([\s\S]+?)\]\}/g, + interpolate : /\{\{([\s\S]+?)\}\}/g + }; _.str = require('underscore.string'); return factory(jarnxmpp, jQuery, store, _, console); } @@ -24,6 +29,10 @@ } else { // Browser globals var store = new Burry.Store('collective.xmpp.chat'); + _.templateSettings = { + evaluate : /\{\[([\s\S]+?)\]\}/g, + interpolate : /\{\{([\s\S]+?)\}\}/g + }; root.xmppchat = factory(jarnxmpp, jQuery, store, _, console || {log: function(){}}); } }(this, function (jarnxmpp, $, store, _, console) { @@ -121,15 +130,15 @@ }, message_template: _.template( - '