Skip to content

Commit 1a27fbb

Browse files
author
Joel Taylor
committed
Merge pull request #256 from codeschool/view_escaped_properly
View escaped properly
2 parents 8a0ed4e + 21bcad7 commit 1a27fbb

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

server/routes/news.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,7 @@ router.
246246
req.sanitize('body').trim();
247247
req.check('body').notEmpty();
248248

249+
249250
var errors = req.validationErrors();
250251

251252
if (errors) {
@@ -319,8 +320,6 @@ router.
319320
req.check('body', 'Description is required').notEmpty();
320321
req.check('body', 'Description must be between 100 and 300 characters').len(100,300);
321322

322-
req.sanitize('body').escape();
323-
req.sanitize('title').escape();
324323

325324
var errors = req.validationErrors();
326325

0 commit comments

Comments
 (0)