diff options
author | Chocobozzz <me@florianbigard.com> | 2018-02-20 10:41:11 +0100 |
---|---|---|
committer | Chocobozzz <me@florianbigard.com> | 2018-02-20 10:41:11 +0100 |
commit | 5de8a55abce53108bc1024f1194457c6528bd11e (patch) | |
tree | 24d55c349807581a86872490753c2e1bddff932d /server | |
parent | 2f315e2f915514eaddee30394b0d99790bcda06b (diff) | |
download | PeerTube-5de8a55abce53108bc1024f1194457c6528bd11e.tar.gz PeerTube-5de8a55abce53108bc1024f1194457c6528bd11e.tar.zst PeerTube-5de8a55abce53108bc1024f1194457c6528bd11e.zip |
Handle line feeds in comments
Diffstat (limited to 'server')
-rw-r--r-- | server/middlewares/validators/video-comments.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/middlewares/validators/video-comments.ts b/server/middlewares/validators/video-comments.ts index 63804da30..227bc1fca 100644 --- a/server/middlewares/validators/video-comments.ts +++ b/server/middlewares/validators/video-comments.ts | |||
@@ -43,7 +43,7 @@ const addVideoCommentThreadValidator = [ | |||
43 | body('text').custom(isValidVideoCommentText).not().isEmpty().withMessage('Should have a valid comment text'), | 43 | body('text').custom(isValidVideoCommentText).not().isEmpty().withMessage('Should have a valid comment text'), |
44 | 44 | ||
45 | async (req: express.Request, res: express.Response, next: express.NextFunction) => { | 45 | async (req: express.Request, res: express.Response, next: express.NextFunction) => { |
46 | logger.debug('Checking addVideoCommentThread parameters.', { parameters: req.params }) | 46 | logger.debug('Checking addVideoCommentThread parameters.', { parameters: req.params, body: req.body }) |
47 | 47 | ||
48 | if (areValidationErrors(req, res)) return | 48 | if (areValidationErrors(req, res)) return |
49 | if (!await isVideoExist(req.params.videoId, res)) return | 49 | if (!await isVideoExist(req.params.videoId, res)) return |
@@ -59,7 +59,7 @@ const addVideoCommentReplyValidator = [ | |||
59 | body('text').custom(isValidVideoCommentText).not().isEmpty().withMessage('Should have a valid comment text'), | 59 | body('text').custom(isValidVideoCommentText).not().isEmpty().withMessage('Should have a valid comment text'), |
60 | 60 | ||
61 | async (req: express.Request, res: express.Response, next: express.NextFunction) => { | 61 | async (req: express.Request, res: express.Response, next: express.NextFunction) => { |
62 | logger.debug('Checking addVideoCommentReply parameters.', { parameters: req.params }) | 62 | logger.debug('Checking addVideoCommentReply parameters.', { parameters: req.params, body: req.body }) |
63 | 63 | ||
64 | if (areValidationErrors(req, res)) return | 64 | if (areValidationErrors(req, res)) return |
65 | if (!await isVideoExist(req.params.videoId, res)) return | 65 | if (!await isVideoExist(req.params.videoId, res)) return |