Skip to content
Browse files

esacpe attributes

  • Loading branch information...
1 parent 98d83fd commit 89880b06b9345c24a16940fbe9bda1daa8316723 James Yu committed with Jan 31, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 public/javascripts/views/edit.js
View
4 public/javascripts/views/edit.js
@@ -32,10 +32,10 @@ App.Views.Edit = Backbone.View.extend({
render: function() {
var out = '<form>';
out += "<label for='title'>Title</label>";
- out += "<input name='title' type='text' value='" + (this.model.get('title') || '') + "' />";
+ out += "<input name='title' type='text' value='" + (this.model.escape('title') || '') + "' />";
out += "<label for='body'>Body</label>";
- out += "<textarea name='body'>" + (this.model.get('body') || '') + "</textarea>";
+ out += "<textarea name='body'>" + (this.model.escape('body') || '') + "</textarea>";
var submitText = this.model.isNew() ? 'Create' : 'Save';

0 comments on commit 89880b0

Please sign in to comment.
Something went wrong with that request. Please try again.