From b8c089cfaa33a94dcd29bc33217fe58ab601c8b9 Mon Sep 17 00:00:00 2001 From: Baris Soner Usakli Date: Thu, 27 Feb 2014 01:43:24 -0500 Subject: [PATCH] added check for invalid tags --- src/webserver.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/webserver.js b/src/webserver.js index 58ea6ae479..f4869b4cbf 100644 --- a/src/webserver.js +++ b/src/webserver.js @@ -148,6 +148,11 @@ process.on('uncaughtException', function(err) { // Meta Tags templateValues.metaTags = defaultMetaTags.concat(options.metaTags || []).map(function(tag) { + if(!tag || !tag.content) { + winston.warn('Invalid meta tag. ' + tag); + return tag; + } + tag.content = tag.content.replace(/[&<>'"]/g, function(tag) { return escapeList[tag] || tag; });