core/server/apps/subscribers/lib/router.js
function errorHandler(error, req, res, next) {
    req.body.email = '';
    req.body.subscribed_url = santizeUrl(req.body.subscribed_url);
    req.body.subscribed_referrer = santizeUrl(req.body.subscribed_referrer);

    if (error.statusCode !== 404) {
        res.locals.error = error;
        return _renderer(req, res);
    }

    next(error);
}
function errorHandler(error, req, res, next) {
    req.body.email = '';
    req.body.subscribed_url = santizeUrl(req.body.subscribed_url);
    req.body.subscribed_referrer = santizeUrl(req.body.subscribed_referrer);

    if (error.statusCode !== 404) {
        res.locals.error = error;
        return _renderer(req, res);
    }

    next(error);
}
function errorHandler ( error , req , res , next ) { req . body . email = '' ; req . body . subscribed_url = santizeUrl ( req . body . subscribed_url ) ; req . body . subscribed_referrer = santizeUrl ( req . body . subscribed_referrer ) ; if ( error . statusCode !== 404 ) { res . locals . error = error ; return _renderer ( req , res ) ; } next ( error ) ; }
Takes care of sanitizing the email input.
XSS prevention.
For success cases, we don't have to worry, because then the input contained a valid email address.
Takes care of sanitizing the email input . XSS prevention . For success cases we don t have to worry because then the input contained a valid email address .