From 82749371ec79f757664cb2bec088d910fa5a4465 Mon Sep 17 00:00:00 2001 From: techmoe <7919562+dev-techmoe@users.noreply.github.com> Date: Mon, 31 May 2021 00:04:18 +0800 Subject: [PATCH] fix(route): [Coolapk] Wrong html tag wrapping (#7601) --- lib/routes/coolapk/utils.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/routes/coolapk/utils.js b/lib/routes/coolapk/utils.js index 710598c1c1b149..69fc40242234f3 100644 --- a/lib/routes/coolapk/utils.js +++ b/lib/routes/coolapk/utils.js @@ -38,7 +38,12 @@ const getHeaders = () => ({ const parseTuwenFromRaw = (raw) => raw.map((i) => { if (i.type === 'text') { - return `

${i.message}

`; + const output = i.message + .split('\n') + .filter((t) => t !== '') + .map((t) => `

${t}

`) + .join(''); + return output; } else if (i.type === 'image') { return `