You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: html_render titles can end on half an emoji at the 200-character limit #44659
readHtmlRenderImage already refuses to end an image label on a lone high surrogate ("never end the label on half an emoji"). readHtmlRenderReference and the html_render publish path still use title.trim().slice(0, 200).
When the 200th UTF-16 unit is the first half of an emoji, the stored card title ends on a broken character.
Current
readHtmlRenderReference({ attachmentId, title: "a".repeat(199) + "🚀 more", height: 420 }).title is 199 as plus a lone high surrogate.
Expected
The title stops before the split character: 199 as, the same rule htmlRenderFileName and readHtmlRenderImage already use.
Steps
Run a unit test that calls readHtmlRenderReference with a title of 199 ASCII characters plus 🚀. The title should equal those 199 characters.
Activity