mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-02 03:55:55 +01:00
properly fixed #713
This commit is contained in:
@@ -94,21 +94,28 @@ var path = require('path'),
|
||||
browserTitle: meta.config.title || 'NodeBB',
|
||||
csrf: options.res.locals.csrf_token,
|
||||
relative_path: nconf.get('relative_path'),
|
||||
meta_tags: metaString,
|
||||
link_tags: linkTags,
|
||||
clientScripts: clientScripts,
|
||||
navigation: custom_header.navigation,
|
||||
'cache-buster': meta.config['cache-buster'] ? 'v=' + meta.config['cache-buster'] : '',
|
||||
allowRegistration: meta.config.allowRegistration === undefined || parseInt(meta.config.allowRegistration, 10) === 1
|
||||
},
|
||||
escapeList = {
|
||||
'&': '&',
|
||||
'<': '<',
|
||||
'>': '>',
|
||||
"'": ''',
|
||||
'"': '"'
|
||||
};
|
||||
|
||||
var uid = '0';
|
||||
|
||||
// Meta Tags
|
||||
templateValues.meta_tags = utils.buildMetaTags(defaultMetaTags.concat(options.metaTags || [])).map(function(tag) {
|
||||
tag.content = tag.content.replace('"', '"').replace("'", ''');
|
||||
templateValues.meta_tags = utils.buildMetaTags(defaultMetaTags.concat(options.metaTags || []).map(function(tag) {
|
||||
tag.content = tag.content.replace(/[&<>'"]/g, function(tag) {
|
||||
return escapeList[tag] || tag;
|
||||
});
|
||||
return tag;
|
||||
});
|
||||
}));
|
||||
templateValues.link_tags = utils.buildLinkTags(defaultLinkTags.concat(options.linkTags || []));
|
||||
|
||||
if(options.req.user && options.req.user.uid) {
|
||||
|
||||
Reference in New Issue
Block a user