Use escaped form of _.template substitution.

This commit is contained in:
Max Goodman
2013-05-14 13:09:49 -07:00
parent 35669220ef
commit 107af02595
2 changed files with 6 additions and 6 deletions

View File

@@ -134,7 +134,7 @@ r.multi.GlobalMultiCache = Backbone.Collection.extend({
r.multi.MultiSubredditItem = Backbone.View.extend({
tagName: 'li',
template: _.template('<a href="/r/<%= srName %>">/r/<%= srName %></a><button class="remove-sr">x</button>'),
template: _.template('<a href="/r/<%- srName %>">/r/<%- srName %></a><button class="remove-sr">x</button>'),
events: {
'click .remove-sr': 'removeSubreddit'
@@ -332,7 +332,7 @@ r.multi.MultiDetails = Backbone.View.extend({
r.multi.MultiAddNoticeBubble = r.ui.Bubble.extend({
className: 'multi-add-notice hover-bubble anchor-right',
template: _.template('<h3><%= awesomeness_goes_here %></h3><p><%= add_multi_sr %></p>'),
template: _.template('<h3><%- awesomeness_goes_here %></h3><p><%- add_multi_sr %></p>'),
render: function() {
this.$el.html(this.template({
@@ -354,9 +354,9 @@ r.multi.SubscribeButton = Backbone.View.extend({
r.multi.MultiSubscribeBubble = r.ui.Bubble.extend({
className: 'multi-selector hover-bubble anchor-right',
template: _.template('<div class="title"><strong><%= title %></strong><a class="sr" href="/r/<%= srName %>">/r/<%= srName %></a></div><div class="throbber"></div>'),
itemTemplate: _.template('<label><input class="add-to-multi" type="checkbox" data-path="<%= path %>" <%= checked %>><%= name %><a href="<%= path %>" target="_blank">&rsaquo;</a></label>'),
itemCreateTemplate: _.template('<label><form class="create-multi"><input type="text" placeholder="<%= createMsg %>"></form><div class="error create-multi-error"></div></label>'),
template: _.template('<div class="title"><strong><%- title %></strong><a class="sr" href="/r/<%- srName %>">/r/<%- srName %></a></div><div class="throbber"></div>'),
itemTemplate: _.template('<label><input class="add-to-multi" type="checkbox" data-path="<%- path %>" <%- checked %>><%- name %><a href="<%- path %>" target="_blank">&rsaquo;</a></label>'),
itemCreateTemplate: _.template('<label><form class="create-multi"><input type="text" placeholder="<%- createMsg %>"></form><div class="error create-multi-error"></div></label>'),
events: {
'click .add-to-multi': 'toggleSubscribed',

View File

@@ -564,7 +564,7 @@ r.ui.scrollFixed.prototype = {
}
r.ui.ConfirmButton = Backbone.View.extend({
confirmTemplate: _.template('<span class="confirmation"><span class="prompt"><%= are_you_sure %></span><button class="yes"><%= yes %></button> / <button class="no"><%= no %></button></div>'),
confirmTemplate: _.template('<span class="confirmation"><span class="prompt"><%- are_you_sure %></span><button class="yes"><%- yes %></button> / <button class="no"><%- no %></button></div>'),
events: {
'click': 'click'
},