From 6328e41bcfa40df37221f82aeaf41d2686768b00 Mon Sep 17 00:00:00 2001 From: redmt Date: Fri, 10 Jun 2022 15:46:28 +0200 Subject: [PATCH] Update processJsonPost.js to remove newlines from selftext_preview --- inc/processJsonPost.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inc/processJsonPost.js b/inc/processJsonPost.js index dd96794..b3cd784 100644 --- a/inc/processJsonPost.js +++ b/inc/processJsonPost.js @@ -155,7 +155,7 @@ async function processJsonPost(json, parsed, user_preferences) { images: null, crosspost: false, selftext: unescape(post.selftext_html), - selftext_preview: post.selftext.substr(0, 120), + selftext_preview: post.selftext.substr(0, 120).replace(/\n/g, ' '), poll_data: post.poll_data, link_flair: user_preferences.flairs != 'false' ? await formatLinkFlair(post) : '',