<%
var i = data.i;
var item = data.item;
var completed = item.completed;

function htmlEscape(str) {
	return String(str)
	.replace(/&/g, '&amp;')
	.replace(/"/g, '&quot;')
	.replace(/'/g, '&#39;')
	.replace(/</g, '&lt;')
	.replace(/>/g, '&gt;');
}
%>
<li class="<%= (completed ? 'completed' : 'active') %>" data-index="<%= i %>">
	<div class='view'>
		<input class="toggle" type="checkbox" <%= (completed ? 'checked' : '') %>>
		<label><%= htmlEscape(item.title) %></label>
		<button class="destroy"></button>
	</div>
	<input class="edit">
</li>
