diff --git a/public/src/helpers.js b/public/src/helpers.js index 407ee3bf17..ca81347a23 100644 --- a/public/src/helpers.js +++ b/public/src/helpers.js @@ -12,7 +12,7 @@ helpers.buildMetaTag = function(tag) { var name = tag.name ? 'name="' + tag.name + '" ' : '', property = tag.property ? 'property="' + tag.property + '" ' : '', - content = tag.content ? 'content="' + tag.content + '" ' : ''; + content = tag.content ? 'content="' + tag.content.replace(/\n/g, ' ') + '" ' : ''; return ''; }; diff --git a/src/controllers/topics.js b/src/controllers/topics.js index d36f96a6e8..51873fdb13 100644 --- a/src/controllers/topics.js +++ b/src/controllers/topics.js @@ -82,6 +82,8 @@ topicsController.get = function(req, res, next) { ogImageUrl = nconf.get('url') + ogImageUrl; } + description = description.replace(/\n/g, ' '); + res.locals.metaTags = [ { name: "title",