| Post Reply | RetroFed Forums Forum Index » PieFed Meta |
| Author | Message | ||
|---|---|---|---|
A_norny_mousse
piefed.social
A_norny_mousse@piefed.socialJoined: 2026-09-27 |
Apparently Lemmy turns my backslashes (used to escape round brackets inside a link) into forward slashes, leading to Lemmy users complaining:
Lemmy does not require the round bracket to be escaped in this case. Why it turns backslashes into forward slashes I have no idea, but it does so even when I try the same thing straight from a Lemmy instance. Is escaping things with backslashes not common practice in Markdown? I know there's so many implementations of Markdown it's hard to even speak of a Spec, but backslashes serve this purpose almost universally. On computers that is. I sense an overarching narrative of Lemmy vs Piefed developing here. Or maybe a need for communication between all client developers, on how to implement things so they work across the fediverse. Hmm, it does feel more like a Lemmy problem in this case. |
||
| 9 Original | |||
|
hendrik
palaver.p3x.de
hendrik@palaver.p3x.de Joined: 2021-08-21 |
I've had issues with those and Markdown as well. One way to get around it, is to encode the brackets the same way the 'ö' is encoded and replace the opening bracket with %28 and the closing one with %29 That's the only universal solution I'm aware of. That'd be this link Just for testing I'll add a link just as is with the brackets unescaped and another one with backslashes Seems they all work on PieFed and the first two work on Lemmy as well, just not the backslash one.
Last one also gets changed around when quoted on Lemmy. Those are backslashes, not forward slashes. See: https://lemmy.world/post/52671143 |
||
| 2 | |||
A_norny_mousse
piefed.social
A_norny_mousse@piefed.socialJoined: 2026-09-27 |
I've had issues with those and Markdown as well. One way to get around it, is to encode the brackets the same way the 'ö' is encoded and replace the opening bracket with %28 and the closing one with %29 That's the only universal solution I'm aware of. That'd be this link Just for testing I'll add a link just as is with the brackets unescaped and another one with backslashes Seems they all work ...
TESTING It works without escaping! Why did I even get into the habit? Must've been a problem months if not years ago. FWIW, escaping with backslashes characters that might otherwise have MD-specific meaning is common, normal even. Ignore it if you will, but converting them to forward slashes is just wrong. |
||
| 2 | |||
|
hendrik
palaver.p3x.de
hendrik@palaver.p3x.de Joined: 2021-08-21 |
TESTING Zollstock It works without escaping! Why did I even get into the habit? Must've been a problem months if not years ago. FWIW, escaping with backslashes characters that might otherwise have MD-specific meaning is common, normal even. Ignore it if you will, but converting them to forward slashes is just wrong.
Yes. Pretty sure this isn't the first complaint about the Markdown parsing. We've had some changes in the past. And I'm not even sure if this is well-defined. Some of Markdown is a bit weird. If I remember correctly, I've used software before which just uses the first closing bracket and cuts off the link there. And another question: What happens if a URL contains a mismatched amount of brackets? like https://palaver.p3x.de/test)page I don't think that'd workpage) Edit: Yeah, that's just wrong 😅 |
||
| 2 | |||
wjs018
piefed.wjs018.xyz
wjs018@piefed.wjs018.xyzJoined: 2025-07-15 |
Piefed uses the markdown2 python library for the markdown to html conversion, and I think it must differ from how lemmy handles things in this case. Like you point out though, markdown is hardly standardized at all when it comes to edge cases like this. I have written tons of code to handle special cases to make piefed's markdown parse the same as lemmy, and to handle special cases like lemmy spoiler blocks. This is a case that I wasn't aware of until this post. I'll do some experiments and see if I can help handle this too. I won't be able to sit down and take a look until next week though. |
||
| 4 | |||
mschae
discuss.mschae23.de
mschae@discuss.mschae23.deJoined: 2026-02-27 |
TESTING Zollstock It works without escaping! Why did I even get into the habit? Must've been a problem months if not years ago. FWIW, escaping with backslashes characters that might otherwise have MD-specific meaning is common, normal even. Ignore it if you will, but converting them to forward slashes is just wrong.
I assume |
||
| 0 | |||
|
hendrik
palaver.p3x.de
hendrik@palaver.p3x.de Joined: 2021-08-21 |
Btw, here's a bugreport for Lemmy: https://github.com/LemmyNet/lemmy/issues/6139 |
||
| 2 | |||
| Post Reply |
Back to top |