Fix Twitter/X thread finisher posting with HTML tags

Previously, Twitter/X was posting thread finisher (message ending signature)
with HTML <p> 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
This commit is contained in:
Meysam Azad 2025-11-09 20:32:58 +07:00
parent 52caf3d55c
commit 4c3e002a26
No known key found for this signature in database
GPG Key ID: 7BF74FFF46B46856
1 changed files with 5 additions and 1 deletions

View File

@ -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 },