Describe the bug
Links in a video description may start later in the text than they should, i.e. <a href="...">Click here!</a> to... may instead render as Cli<a href="...">ck here! to</a>.... This occurs most visibly when there are emojis in the description before the link.
From a quick skim of description.cr, it looks like Invidious counts the offset/length in codepoints, and I'm guessing YouTube might be counting in utf16 code units instead (where an emoji would be a surrogate pair and count for 2 instead of 1)
Steps to Reproduce
- Open https://youtu.be/jjyesTkGNT4 in your instance of choice.
- Scroll down to the description.
- Observe that the clickable links start slightly later in the text than they should. For this video it's perhaps most obvious on the chapter markers.
Logs
Screenshots
Additional context
No response
AI Policy
AI usage
AI was not used to create this issue
Model(s) used
No response
Tool(s) used
No response
How was AI used?
No response
Describe the bug
Links in a video description may start later in the text than they should, i.e.
<a href="...">Click here!</a> to...may instead render asCli<a href="...">ck here! to</a>.... This occurs most visibly when there are emojis in the description before the link.From a quick skim of description.cr, it looks like Invidious counts the offset/length in codepoints, and I'm guessing YouTube might be counting in utf16 code units instead (where an emoji would be a surrogate pair and count for 2 instead of 1)
Steps to Reproduce
Logs
Screenshots
Additional context
No response
AI Policy
AI usage
AI was not used to create this issue
Model(s) used
No response
Tool(s) used
No response
How was AI used?
No response