bluesky-social / social-app

The Bluesky Social application for Web, iOS, and Android
https://bsky.app
MIT License
12.37k stars 1.58k forks source link

GitHub embed cards have apostrophes and other symbols rendered in HTML code #6309

Open heikadog opened 1 week ago

heikadog commented 1 week ago

Steps to Reproduce

  1. Embed a GitHub card with descriptions that have things like apostrophes—words like "don't"
  2. Observe that they're rendered in HTML code (')

Attachments

Screenshot_20241113-155959

What platform(s) does this occur on?

Android

Device Info

Google Pixel 8

What version of the app are you using?

Build version: 1.93.0.373; Bundle info: 0ac7c0962 (prod); Bundle date: 24111005; Platform: android

Additional Information

No response

amhyder commented 5 hours ago

Had a chance to look into this a little. It looks like it might be something related to the data parsing on bluesky's side. I can see the request URL going to the cardyb.bsky.app/v1 endpoint and we're getting the partially encoded string back in the response body. I'm wondering if the correct move here is to fix this in the API layer rather than try and compensate in the front end.

{
    "error": "",
    "likely_type": "html",
    "url": "https://github.com/bluesky-social/social-app/pull/6307",
    "title": "Increase strength of check for post stats guard by estrattonbailey · Pull Request #6307 · bluesky-social/social-app",
    "description": "Some folks noticed during the outage earlier today that quoteCount wasn\u0026#39;t returned on responses, which caused this section to display with no contents. This PR checks for the existence of these...",
    "image": "https://cardyb.bsky.app/v1/image?url=https%3A%2F%2Fopengraph.githubassets.com%2Fbd8c9e278981dbeaabe5b7a5cc572e73d1518422bb0aeff69ec9de8afa330601%2Fbluesky-social%2Fsocial-app%2Fpull%2F6307"
}