In my database I have:
ListItem.title = Hello & Goodbye3
Then in my view I have:
ko.mapping.updateFromJS(List.list_items_open, <%= raw @list.list_items.where(:completed => false).to_json(:only => [:id, :title, :completed, :position]) %> );
<ol data-bind='template: { name: "list_item_template", foreach: List.list_items_open}'></ol>
<script type="text/html" id="list_item_template">
<li class="listItem">
<input class="list_item_title" maxlength="250" name="list_item[title]" type="text" data-bind="value: title>
</li>
</script>
Problem here is that the value in the input is being rendered as:
Hello & Goodbye3
And not:
Hello & Goodbye3
Any ideas on how I should be handling this? Were I should be encoding as raw? Thanks