From 4907bb3572af37f9c7cf1c02cf0ac648e3c0de39 Mon Sep 17 00:00:00 2001 From: Nevo David Date: Wed, 16 Jul 2025 22:21:36 +0700 Subject: [PATCH] feat: in case of no html, dont mutate --- libraries/helpers/src/utils/strip.html.validation.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libraries/helpers/src/utils/strip.html.validation.ts b/libraries/helpers/src/utils/strip.html.validation.ts index 1880c08b..f78eb2f3 100644 --- a/libraries/helpers/src/utils/strip.html.validation.ts +++ b/libraries/helpers/src/utils/strip.html.validation.ts @@ -134,6 +134,10 @@ export const stripHtmlValidation = ( value: string, replaceBold = false ): string => { + if (value.indexOf("

") === -1) { + return value; + } + const html = (value || '') .replace(/ /gi, ' ') .replace(/^]*>/i, '')