Spyke

Syndicated from the fediverse. Read and engage on the original instance.

View original on lemmy.world

Please fix the excessive HTML escaping of posts

Right now Lemmy is unusable for writing code that contains less than/greater than signs because Lemmy's sanitizer treats that as potentially malicious HTML code.

Here's an example:

if(x < y)
{
/* ... */
}

The listing becomes littered with < gibberish.

View original on lemmy.world
49

7 replies

Don't forget & in community names and sidebars.

Constantly getting trolled by &

23
lemmy.ml

It actually looks perfectly fine on Sync for Lemmy so I assume this is only a front-end problem. There are alternative front-ends that you could try.

12
Crulreply

There are alternative front-ends that you could try.

The 3 frontends for browser / PC that I know (default, mlmym and alexandrite) have this problem. Do you know of any other one that works?

Thanks!

6

Yeah I think this was hastily done to prevent the XSS injection attacks that were happening IIRC. They implemented encoding for content, but looks like they never got around to fully decoding it.

Issue could've been avoided by just restricting the encoding to when the user types content in (and before database insertion), and decoding when showing the content in the UI.

6

You reached the end

Please fix the excessive HTML escaping of posts | Spyke