From d753619240e7c349e68eac6382f7798c75617bd9 Mon Sep 17 00:00:00 2001 From: Nevo David Date: Wed, 30 Jul 2025 01:10:46 +0700 Subject: [PATCH] feat: fix ul and li for normal platforms --- .../src/utils/strip.html.validation.ts | 35 ++++++++++++++----- .../integrations/social/youtube.provider.ts | 1 - 2 files changed, 27 insertions(+), 9 deletions(-) diff --git a/libraries/helpers/src/utils/strip.html.validation.ts b/libraries/helpers/src/utils/strip.html.validation.ts index 1843f9f0..7ee12628 100644 --- a/libraries/helpers/src/utils/strip.html.validation.ts +++ b/libraries/helpers/src/utils/strip.html.validation.ts @@ -138,7 +138,17 @@ export const stripHtmlValidation = ( none = false ): string => { if (type === 'html') { - return striptags(value, ['ul', 'ol', 'li', 'h1', 'h2', 'h3', 'p', 'strong', 'u']); + return striptags(value, [ + 'ul', + 'ol', + 'li', + 'h1', + 'h2', + 'h3', + 'p', + 'strong', + 'u', + ]); } if (type === 'markdown') { @@ -161,13 +171,22 @@ export const stripHtmlValidation = ( } if (replaceBold) { - return striptags(convertLinkedinMention(convertToAscii(html)), [ - 'ul', - 'li', - 'h1', - 'h2', - 'h3', - ]); + const processedHtml = convertLinkedinMention( + convertToAscii( + html + .replace(/