Permalink
Browse files

Ok, the party is over

  • Loading branch information...
reu committed Jan 25, 2011
1 parent 3912e0d commit 8db7e729176580a05c0522ed14fa3515bcd741bc
Showing with 5 additions and 2 deletions.
  1. +2 −1 package.json
  2. +3 −1 server.js
View
@@ -12,6 +12,7 @@
},
"dependencies": {
"express": "1.0.3",
- "jade": "0.6.0"
+ "jade": "0.6.0",
+ "sanitizer": "0.0.14"
}
}
View
@@ -6,7 +6,8 @@ var express = require('express'),
express.bodyDecoder(),
express.logger({ format: ':method :url :status in :response-timems' }),
express.methodOverride()
- );
+ ),
+ sanitizer = require('sanitizer');
app.set('view engine', 'jade');
@@ -20,6 +21,7 @@ Room = function(){
this.maximum_messages = 200,
this.appendMessage = function(message) {
+ var message = sanitizer.escape(message);
// Adds the message to the rooms messages collection
this.messages.push(message);

0 comments on commit 8db7e72

Please sign in to comment.