Egregoros

Signal feed

Timeline

Post

Remote status

Replies

32

@hj The top bar changes are crimes against frontend design. Settings profiles are interesting though. And MFM is something I would want to do some time, but it requires writing a proper parser like BBCode, the Akkoma one is a hack.

@hj You don't need a permission I think. And it is just HTML with funky span tag classes. The MFM syntax is "$[directive1=value,directive2=value,... Post Content]". Here's a FEP that Akkoma implements.

There are two parts for this, the BE pre-processing parser that takes input when post has MFM enabled and generates a string with the MFM tags replaced with the HTML representation that is then sent to either another parser (like BBCode) or straight through. The second part is FE that provides the styling for the HTML.

For the BE parser, Nimble Parsec used by BBCode is pretty comfy at least to me, Akkoma implements their own lexer and everything.

You could implement it fully in FE, but then other frontends like Nicolium wouldn't be able to make use of it easily.
@hj @lain @mkljczk It is a disaster waiting to happen, yes. When it is done on the backend, it's not as bad as the content is still sanitized on the backend.

The backend could also parse it in stages so "$[jelly.speed=2s idk] [i]italics[/i] the rest", would first be:
<span class="mfm-jelly" data-mfm-jelly="2s">idk</span> [i]italics[/i] the rest
and then:
<span class="mfm-jelly" data-mfm-jelly="2s">idk</span> <i>italics</i> the rest
@hj @lain @mkljczk
<span>$[whatever </span>]
would result into
<span><span class="mfm-whatever"></span></span>.
where the last closing span is the one inserted by the parser. An empty span isn't an issue I think, removing the first span is worse, because there now is a closing span tag for nothing.

Still, both of those should be sanitized before that matters.
@phnt @hj Yeah, and do that for every single instance you're about to visit. What would be your solution for the same frontend including <canvas>-based attachment molestation enabled by default? MRF that reverse searches them and replaces attachment link with unmolested image?
@mpg @hj
>do that for every single instance you're about to visit

Paste the link to the post into the search. Unless the remote instance deliberately killed of federation, it will give you the post and if it is a post from current Pleroma release/Mastodon/GTS also automatically fetch all replies to the post.

>What would be your solution for the same frontend including <canvas>-based attachment molestation enabled by default?

Disable it, or ask your admin to disable the option by default in backend config (this should now be possible for all settings in FE I think; possibly not in a release yet)
@mpg @hj It doesn't bother most people as evidenced by there being zero issues in the repo about it being the default, outside of few users I could count on my hands outside git. It bothers you and few others, not everybody.

If you get so mad about webp attachments, maybe also complain to Misskey doing it by default and John Mastodon for re-encoding all attachments by default.