diff --git a/libraries/nestjs-libraries/src/integrations/social/linkedin.provider.ts b/libraries/nestjs-libraries/src/integrations/social/linkedin.provider.ts index 441e9084f..c68aaf2bb 100644 --- a/libraries/nestjs-libraries/src/integrations/social/linkedin.provider.ts +++ b/libraries/nestjs-libraries/src/integrations/social/linkedin.provider.ts @@ -340,10 +340,12 @@ export class LinkedinProvider extends SocialAbstract implements SocialProvider { type === 'personal' ? `urn:li:person:${id}` : `urn:li:organization:${id}`, - commentary: removeMarkdown({ - text: firstPost.message.replace('\n', '𝔫𝔢𝔴𝔩𝔦𝔫𝔢'), - except: [/@\[(.*?)]\(urn:li:organization:(\d+)\)/g], - }).replace('𝔫𝔢𝔴𝔩𝔦𝔫𝔢', '\n'), + commentary: firstPost.message + .replace(/\*/g, '\\*') + .replace(/\(/g, '\\(') + .replace(/\)/g, '\\)') + .replace(/\{/g, '\\{') + .replace(/}/g, '\\}'), visibility: 'PUBLIC', distribution: { feedDistribution: 'MAIN_FEED',