fix overlength summaries
parent
86787d85ea
commit
07508faf1a
|
@ -69,10 +69,17 @@ async function do_feeds() {
|
|||
item.content = item.summary;
|
||||
}
|
||||
|
||||
if(!item.description
|
||||
|| (typeof item.description == "string" && item.description.length === 0)) item.description = striptags(item.content)
|
||||
if(typeof item.description !== "string") {
|
||||
if(typeof item.summary === "string")
|
||||
item.description = item.summary;
|
||||
else if(typeof item.content === "string")
|
||||
item.description = item.content;
|
||||
}
|
||||
|
||||
item.description = striptags(item.content)
|
||||
.substring(0, DESCRIPTION_LENGTH);
|
||||
|
||||
|
||||
if(!item.pubdate) item.pubdate = item.published
|
||||
|| item.updated
|
||||
|| new Date("1970-01-01");
|
||||
|
|
Loading…
Reference in New Issue