Commit ecbd9576 authored by Sindre Sorhus's avatar Sindre Sorhus

Use the Underscore escape interpolation in user supplied strings in the Backbone apps. Fixes #250

parent a373c821
...@@ -30,10 +30,10 @@ ...@@ -30,10 +30,10 @@
<script type="text/template" id="item-template"> <script type="text/template" id="item-template">
<div class="view"> <div class="view">
<input class="toggle" type="checkbox" <%= completed ? 'checked' : '' %>> <input class="toggle" type="checkbox" <%= completed ? 'checked' : '' %>>
<label><%= title %></label> <label><%- title %></label>
<button class="destroy"></button> <button class="destroy"></button>
</div> </div>
<input class="edit" value="<%= title %>"> <input class="edit" value="<%- title %>">
</script> </script>
<script type="text/template" id="stats-template"> <script type="text/template" id="stats-template">
<span id="todo-count"><strong><%= remaining %></strong> <%= remaining === 1 ? 'item' : 'items' %> left</span> <span id="todo-count"><strong><%= remaining %></strong> <%= remaining === 1 ? 'item' : 'items' %> left</span>
......
<div class="view"> <div class="view">
<input class="toggle" type="checkbox" <%= completed ? 'checked="checked"' : '' %> /> <input class="toggle" type="checkbox" <%= completed ? 'checked="checked"' : '' %> />
<label><%= title %></label> <label><%- title %></label>
<button class="destroy"></button> <button class="destroy"></button>
</div> </div>
<input class="edit" type="text" value="<%= title %>" /> <input class="edit" type="text" value="<%- title %>" />
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment