|
|
|
@ -288,7 +288,7 @@ function addTags(topicData, req, res) {
|
|
|
|
|
},
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
var regex = /src\s*=\s*"(.+?)"/g;
|
|
|
|
|
var regex = /src\s*=\s*"(.+?)"/;
|
|
|
|
|
|
|
|
|
|
topicData.posts.forEach(function (postData) {
|
|
|
|
|
var match = regex.exec(postData.content);
|
|
|
|
@ -297,6 +297,9 @@ function addTags(topicData, req, res) {
|
|
|
|
|
if (image.startsWith(nconf.get('url') + '/plugins')) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (!image.startsWith('http')) {
|
|
|
|
|
image = nconf.get('url') + image;
|
|
|
|
|
}
|
|
|
|
|
res.locals.metaTags.push({
|
|
|
|
|
property: 'og:image',
|
|
|
|
|
content: image,
|
|
|
|
|