fedimbed: fix newlines getting stripped

This commit is contained in:
Cynthia Foxwell 2022-12-06 11:02:46 -07:00
parent b46c711b65
commit fe37faedc0

View file

@ -190,7 +190,8 @@ async function processUrl(msg, url) {
}
}
} else {
content = postData.content;
content =
postData._misskey_content ?? postData.source?.content ?? postData.content;
cw = postData.summary;
timestamp = postData.published;
for (const attachment of postData.attachment) {
@ -251,6 +252,7 @@ async function processUrl(msg, url) {
cw = cw ?? "";
// TODO: convert certain HTML tags back to markdown
content = content.replace(/<br>/g, "\n");
content = content.replace(/(<([^>]+)>)/gi, "");
content = parseHtmlEntities(content);