mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-01 19:46:01 +01:00
added check for invalid tags
This commit is contained in:
@@ -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;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user