Skip to content
This repository was archived by the owner on Apr 2, 2019. It is now read-only.

Commit c82f9ed

Browse files
committed
Merge pull request #604 from NerdcoreSteve/master
Explicitly set underscore template delimiters
2 parents 6fe21ed + 5667202 commit c82f9ed

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

lib/backgrid.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1404,7 +1404,15 @@ var SelectCellEditor = Backgrid.SelectCellEditor = CellEditor.extend({
14041404
},
14051405

14061406
/** @property {function(Object, ?Object=): string} template */
1407-
template: _.template('<option value="<%- value %>" <%= selected ? \'selected="selected"\' : "" %>><%- text %></option>', null, {variable: null}),
1407+
template: _.template(
1408+
'<option value="<%- value %>" <%= selected ? \'selected="selected"\' : "" %>><%- text %></option>',
1409+
null,
1410+
{
1411+
variable : null,
1412+
evaluate : /<%([\s\S]+?)%>/g,
1413+
interpolate : /<%=([\s\S]+?)%>/g,
1414+
escape : /<%-([\s\S]+?)%>/g
1415+
}),
14081416

14091417
setOptionValues: function (optionValues) {
14101418
this.optionValues = optionValues;
@@ -2891,4 +2899,4 @@ var Grid = Backgrid.Grid = Backbone.View.extend({
28912899

28922900
});
28932901
return Backgrid;
2894-
}));
2902+
}));

0 commit comments

Comments
 (0)