Skip to content

fix misplaced links in community notes - #1428

Merged
dimdenGD merged 1 commit into
dimdenGD:masterfrom
SAY-5:fix-community-note-links
Nov 15, 2026
Merged

dimdenGD merged 1 commit into
dimdenGD:masterfrom
SAY-5:fix-community-note-links

Conversation

@SAY-5

@SAY-5 SAY-5 commented Nov 14, 2026

Copy link
Copy Markdown
Contributor

The note text was escaped before being split into characters, so every ", ', &, < or > became an entity several characters long and pushed the fromIndex/toIndex link positions out of place (in the #1259 note the two quotes around "Made with AI" shift both links 10 characters to the left). Escaping each character after splitting keeps the indices lined up; the same block is fixed in helpers.js and tweetviewer.js. I couldn't test it against a live account, so I ran the note rendering block in node with the text from the screenshot, which gives the exact broken output before this change and the right links after.

Fixes #1259

Signed-off-by: Sai Asish Y <say.apm35@gmail.com>
@dimdenGD
dimdenGD merged commit db721e6 into dimdenGD:master Nov 15, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Community notes url improperly formatted

2 participants