Skip to content

πŸ“¨ The ultimate agentic social media scheduling tool πŸ€–

feat: in case of no html, dont mutate

Nevo David4907bb3572af
diff --git a/libraries/helpers/src/utils/strip.html.validation.ts b/libraries/helpers/src/utils/strip.html.validation.ts
index 1880c08b7..f78eb2f39 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("<p>") === -1) {
+ return value;
+ }
+
const html = (value || '')
.replace(/&nbsp;/gi, ' ')
.replace(/^<p[^>]*>/i, '')