Mailing list mode: "Upload" links broken (?) in e-mails

This is still sitting in my list a few months later and yet another one of those small yet extremely annoying edge cases where we really want a reverse markdown parser.

The problem is that the raw for this image:

image

Is:

![image|65x79](upload://bkLTU01hzKturAl7WsxEXeHYk1y.png)

I guess the trivial thing that we can do here is that is a bit destructive, and will ruin stuff for code blocks, is substitute, like so:

upload://bkLTU01hzKturAl7WsxEXeHYk1y.png

with

https://global.discourse-cdn.com/meta/original/3X/4/f/4f710992a5de8a73bfc0198ac9fa557cdfcc3380.png

If we use a straight regex gsub, this will clearly break all sorts of things for the 0.01% case but will improve the 99.9% case for the OP here.

(also we need to be careful not to have a rogue post issue 10,000 queries, so we need to do this in a batch of sorts)

@codinghorror does this sound good to you. It makes me feel a bit yuck but that is close to the best we can do now without a reverse parser.

cc @cvx / @zogstrip

3 Likes