change description length to 160

isekai-main
Barış Soner Uşaklı 2 years ago
parent 1b2f8561e0
commit 9044e10e64

@ -209,8 +209,8 @@ async function addTags(topicData, req, res, currentPage) {
description = utils.stripHTMLTags(utils.decodeHTMLEntities(postAtIndex.content)); description = utils.stripHTMLTags(utils.decodeHTMLEntities(postAtIndex.content));
} }
if (description.length > 255) { if (description.length > 160) {
description = `${description.slice(0, 255)}...`; description = `${description.slice(0, 160)}...`;
} }
description = description.replace(/\n/g, ' '); description = description.replace(/\n/g, ' ');

Loading…
Cancel
Save