From ceef1006d4d8165c094621cf3cc0aec8eb378e7b Mon Sep 17 00:00:00 2001 From: Gilad Resisi Date: Sun, 30 Aug 2026 12:38:19 +0700 Subject: [PATCH 1/5] feat: auto text direction (RTL) in composer editor and previews --- .../components/launches/general.preview.component.tsx | 1 + apps/frontend/src/components/new-launch/editor.tsx | 9 ++++++++- .../new-launch/providers/facebook/facebook.preview.tsx | 3 +++ .../new-launch/providers/instagram/instagram.preview.tsx | 2 ++ .../new-launch/providers/linkedin/linkedin.preview.tsx | 2 ++ .../new-launch/providers/pinterest/pinterest.preview.tsx | 1 + .../new-launch/providers/reddit/reddit.provider.tsx | 2 ++ .../new-launch/providers/tiktok/tiktok.preview.tsx | 2 +- .../new-launch/providers/youtube/youtube.preview.tsx | 1 + 9 files changed, 21 insertions(+), 2 deletions(-) diff --git a/apps/frontend/src/components/launches/general.preview.component.tsx b/apps/frontend/src/components/launches/general.preview.component.tsx index e8bbc575e0..982ab8eecb 100644 --- a/apps/frontend/src/components/launches/general.preview.component.tsx +++ b/apps/frontend/src/components/launches/general.preview.component.tsx @@ -111,6 +111,7 @@ export const GeneralPreviewComponent: FC<{
{background ? (
) : (
)}
diff --git a/apps/frontend/src/components/new-launch/providers/reddit/reddit.provider.tsx b/apps/frontend/src/components/new-launch/providers/reddit/reddit.provider.tsx index e09cae29d5..946fd78376 100644 --- a/apps/frontend/src/components/new-launch/providers/reddit/reddit.provider.tsx +++ b/apps/frontend/src/components/new-launch/providers/reddit/reddit.provider.tsx @@ -37,6 +37,7 @@ const RenderRedditComponent: FC<{ case 'self': return (
{ {integration?.name}
@{integration?.name}
-
diff --git a/apps/frontend/src/components/new-launch/providers/youtube/youtube.preview.tsx b/apps/frontend/src/components/new-launch/providers/youtube/youtube.preview.tsx index c942b46821..40e093df9c 100644 --- a/apps/frontend/src/components/new-launch/providers/youtube/youtube.preview.tsx +++ b/apps/frontend/src/components/new-launch/providers/youtube/youtube.preview.tsx @@ -141,6 +141,7 @@ export const YoutubePreview: FC<{
From 179ba4dbfb76c792f9c0dd591698e71a2a5f5d92 Mon Sep 17 00:00:00 2001 From: Gilad Resisi Date: Sun, 30 Aug 2026 12:55:57 +0700 Subject: [PATCH 2/5] fix: allow dir attribute through post content sanitizer --- libraries/helpers/src/utils/sanitize.post.content.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/libraries/helpers/src/utils/sanitize.post.content.ts b/libraries/helpers/src/utils/sanitize.post.content.ts index 9f2d98618b..380a720ed3 100644 --- a/libraries/helpers/src/utils/sanitize.post.content.ts +++ b/libraries/helpers/src/utils/sanitize.post.content.ts @@ -15,6 +15,7 @@ const ALLOWED_TAGS = [ ]; const ALLOWED_ATTR = [ + 'dir', 'href', 'target', 'rel', From fd487c85a9eb82b4949b9d271b1003ccd4ab696a Mon Sep 17 00:00:00 2001 From: Gilad Resisi Date: Sun, 30 Aug 2026 13:12:44 +0700 Subject: [PATCH 3/5] fix: handle p tags with attributes and isolate IG caption direction --- apps/frontend/src/components/new-launch/add.edit.modal.tsx | 6 +++--- .../new-launch/providers/instagram/instagram.preview.tsx | 3 ++- libraries/helpers/src/utils/strip.html.validation.ts | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/apps/frontend/src/components/new-launch/add.edit.modal.tsx b/apps/frontend/src/components/new-launch/add.edit.modal.tsx index a974e4bf5a..f621f699a1 100644 --- a/apps/frontend/src/components/new-launch/add.edit.modal.tsx +++ b/apps/frontend/src/components/new-launch/add.edit.modal.tsx @@ -150,7 +150,7 @@ export const AddEditModalInnerInner: FC = (props) => { existingData.posts.map((post) => ({ delay: post.delay, content: - post.content.indexOf('

') > -1 + post.content.indexOf(' -1 ? post.content : post.content .split('\n') @@ -175,7 +175,7 @@ export const AddEditModalInnerInner: FC = (props) => { props.onlyValues?.length ? props.onlyValues.map((p) => ({ content: - p.content.indexOf('

') > -1 + p.content.indexOf(' -1 ? p.content : p.content .split('\n') @@ -188,7 +188,7 @@ export const AddEditModalInnerInner: FC = (props) => { ? props.set.posts[0].value.map((p: any) => ({ id: makeId(10), content: - p.content.indexOf('

') > -1 + p.content.indexOf(' -1 ? p.content : p.content .split('\n') diff --git a/apps/frontend/src/components/new-launch/providers/instagram/instagram.preview.tsx b/apps/frontend/src/components/new-launch/providers/instagram/instagram.preview.tsx index 7ee9dcf6b5..68e0d48ece 100644 --- a/apps/frontend/src/components/new-launch/providers/instagram/instagram.preview.tsx +++ b/apps/frontend/src/components/new-launch/providers/instagram/instagram.preview.tsx @@ -34,6 +34,7 @@ export const InstagramPreview: FC<{ const finalValue = `${integration?.name} ` + + `` + newContent .slice(start, end) .replace(/\[\[\[([.\s\S]*?)]]]/, (match, match1) => { @@ -43,7 +44,7 @@ export const InstagramPreview: FC<{ newContent.slice(end).replace(/\[\[\[([.\s\S]*?)]]]/, (match, match1) => { return `${match1}`; }) + - ``; + ``; return { text: finalValue, images: p.image }; }); diff --git a/libraries/helpers/src/utils/strip.html.validation.ts b/libraries/helpers/src/utils/strip.html.validation.ts index d780fc7145..da76faf429 100644 --- a/libraries/helpers/src/utils/strip.html.validation.ts +++ b/libraries/helpers/src/utils/strip.html.validation.ts @@ -217,7 +217,7 @@ export const stripHtmlValidation = ( .replace(/</gi, '<'); } - if (value.indexOf('

') === -1 && !none) { + if (value.indexOf(' Date: Sun, 30 Aug 2026 13:24:48 +0700 Subject: [PATCH 4/5] fix: match paragraph tag shape when detecting HTML content --- apps/frontend/src/components/new-launch/add.edit.modal.tsx | 6 +++--- libraries/helpers/src/utils/strip.html.validation.ts | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/frontend/src/components/new-launch/add.edit.modal.tsx b/apps/frontend/src/components/new-launch/add.edit.modal.tsx index f621f699a1..a10d0b7b16 100644 --- a/apps/frontend/src/components/new-launch/add.edit.modal.tsx +++ b/apps/frontend/src/components/new-launch/add.edit.modal.tsx @@ -150,7 +150,7 @@ export const AddEditModalInnerInner: FC = (props) => { existingData.posts.map((post) => ({ delay: post.delay, content: - post.content.indexOf(' -1 + /]/i.test(post.content) ? post.content : post.content .split('\n') @@ -175,7 +175,7 @@ export const AddEditModalInnerInner: FC = (props) => { props.onlyValues?.length ? props.onlyValues.map((p) => ({ content: - p.content.indexOf(' -1 + /]/i.test(p.content) ? p.content : p.content .split('\n') @@ -188,7 +188,7 @@ export const AddEditModalInnerInner: FC = (props) => { ? props.set.posts[0].value.map((p: any) => ({ id: makeId(10), content: - p.content.indexOf(' -1 + /]/i.test(p.content) ? p.content : p.content .split('\n') diff --git a/libraries/helpers/src/utils/strip.html.validation.ts b/libraries/helpers/src/utils/strip.html.validation.ts index da76faf429..a2f1f8d2fe 100644 --- a/libraries/helpers/src/utils/strip.html.validation.ts +++ b/libraries/helpers/src/utils/strip.html.validation.ts @@ -217,7 +217,7 @@ export const stripHtmlValidation = ( .replace(/</gi, '<'); } - if (value.indexOf(']/i.test(value) && !none) { return value; } From e2860a6b96b48cbc2a9d4b55d6ec829627426ac2 Mon Sep 17 00:00:00 2001 From: Gilad Resisi Date: Sun, 30 Aug 2026 13:30:26 +0700 Subject: [PATCH 5/5] fix: markdown conversion regexes tolerate paragraph and heading attributes --- libraries/helpers/src/utils/strip.html.validation.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libraries/helpers/src/utils/strip.html.validation.ts b/libraries/helpers/src/utils/strip.html.validation.ts index a2f1f8d2fe..4e0299299f 100644 --- a/libraries/helpers/src/utils/strip.html.validation.ts +++ b/libraries/helpers/src/utils/strip.html.validation.ts @@ -179,17 +179,17 @@ export const stripHtmlValidation = ( return striptags( convertMention( value - .replace(/

([.\s\S]*?)<\/h1>/g, (match, p1) => { + .replace(/]*>([.\s\S]*?)<\/h1>/g, (match, p1) => { return `

# ${p1}

\n`; }) .replace(/&/gi, '&') .replace(/ /gi, ' ') .replace(/"/gi, '"') .replace(/'/gi, "'") - .replace(/

([.\s\S]*?)<\/h2>/g, (match, p1) => { + .replace(/]*>([.\s\S]*?)<\/h2>/g, (match, p1) => { return `

## ${p1}

\n`; }) - .replace(/

([.\s\S]*?)<\/h3>/g, (match, p1) => { + .replace(/]*>([.\s\S]*?)<\/h3>/g, (match, p1) => { return `

### ${p1}

\n`; }) .replace(/([.\s\S]*?)<\/u>/g, (match, p1) => { @@ -201,7 +201,7 @@ export const stripHtmlValidation = ( .replace(/([.\s\S]*?)<\/li.*?>/gm, (match, p1) => { return `
  • - ${p1.replace(/\n/gm, '')}
  • `; }) - .replace(/

    ([.\s\S]*?)<\/p>/g, (match, p1) => { + .replace(/]*>([.\s\S]*?)<\/p>/g, (match, p1) => { return `

    ${p1}

    \n`; }) .replace(