From 4c3e002a261f3f26821dfd526204054686c2aca6 Mon Sep 17 00:00:00 2001 From: Meysam Azad Date: Sun, 9 Nov 2025 20:32:58 +0700 Subject: [PATCH] Fix Twitter/X thread finisher posting with HTML tags Previously, Twitter/X was posting thread finisher (message ending signature) with HTML

elements hardcoded into the message text. This was because the thread_finisher content was being used directly without HTML stripping. This fix wraps the thread_finisher text with stripHtmlValidation() to remove HTML tags and convert them to plain text, consistent with how other platforms (Bluesky, Threads, Mastodon) handle this feature. Changes: - Added stripHtmlValidation() call for thread_finisher in X provider - Now matches the implementation pattern used in Bluesky provider - Ensures thread finisher posts plain text instead of HTML markup --- .../nestjs-libraries/src/integrations/social/x.provider.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libraries/nestjs-libraries/src/integrations/social/x.provider.ts b/libraries/nestjs-libraries/src/integrations/social/x.provider.ts index e1ad9eee..fe2c215a 100644 --- a/libraries/nestjs-libraries/src/integrations/social/x.provider.ts +++ b/libraries/nestjs-libraries/src/integrations/social/x.provider.ts @@ -405,7 +405,11 @@ export class XProvider extends SocialAbstract implements SocialProvider { await this.runInConcurrent(async () => client.v2.tweet({ text: - postDetails?.[0]?.settings?.thread_finisher! + + stripHtmlValidation( + 'normal', + postDetails?.[0]?.settings?.thread_finisher!, + true + ) + '\n' + ids[0].releaseURL, reply: { in_reply_to_tweet_id: ids[ids.length - 1].postId },