3 ms·
> Mastodon stores toots in HTML and presents that HTML to API consumers. What. The actual. F. How? Why? Who ever thought this was a good idea? I would often
by dmitriid 4y ago
> Mastodon stores toots in HTML and presents that HTML to API consumers.
What. The actual. F.
How? Why? Who ever thought this was a good idea?
I would often complain about Twitter API, and how bad it was, but this is just beyond awful.
- masklinn 4y ago> How? Why? Who ever thought this was a good idea? I guess it avoids needing to invent your own message format, but it means that every client needs an HTML parser in order to process and clean up statuses? That sounds... great.
- deleted 4y ago[deleted]
- rockisch 4y agoMy guess is they're using the same public API in the actual app. Of course, I'm really hoping the HTML is added at runtime, and not stored in the DB. Imagine doing a data migration to modify an HTML stored in the DB. C H A O S
- masklinn 4y ago> Of course, I'm really hoping the HTML is added at runtime, and not stored in the DB. Looks to me like HTML statuses are part of the federation protocol. In fact, there's an issue[0] indicating that the sanitizer of the reference implementation doesn't allow Markdown to federate. There is also an old status indicating that even if more elements are added, the reference CSS basically strips everything (I assume visually)[1]. [0] https://github.com/mastodon/mastodon/issues/8474 https://github.com/mastodon/mastodon/issues/8474 [1] https://is.a.qute.dog/@KS/872334 https://is.a.qute.dog/@KS/872334
- morelisp 4y agoConfluence also does this. Everyone loves Confluence, right?
- xena 4y agoIf I recall this is actually because of how ActivityPub works. It's a W3C standard. There's usually some cursed somewhere. ActivityPub just does the cursed in the message interchange format.