mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-06 14:05:46 +01:00
closes #3654 removed double escape
This commit is contained in:
@@ -163,15 +163,13 @@ topicsController.get = function(req, res, callback) {
|
|||||||
var postAtIndex = findPost(Math.max(0, req.params.post_index - 1));
|
var postAtIndex = findPost(Math.max(0, req.params.post_index - 1));
|
||||||
|
|
||||||
if (postAtIndex && postAtIndex.content) {
|
if (postAtIndex && postAtIndex.content) {
|
||||||
description = S(postAtIndex.content).stripTags().decodeHTMLEntities().s;
|
description = S(postAtIndex.content).decodeHTMLEntities().stripTags().s;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (description.length > 255) {
|
if (description.length > 255) {
|
||||||
description = description.substr(0, 255) + '...';
|
description = description.substr(0, 255) + '...';
|
||||||
}
|
}
|
||||||
|
|
||||||
description = validator.escape(description);
|
|
||||||
|
|
||||||
var ogImageUrl = '';
|
var ogImageUrl = '';
|
||||||
if (topicData.thumb) {
|
if (topicData.thumb) {
|
||||||
ogImageUrl = topicData.thumb;
|
ogImageUrl = topicData.thumb;
|
||||||
|
|||||||
Reference in New Issue
Block a user