System auto converts HTML images into Markdown breaking it

This is a rather obscure issue, but if you try and do something like this in HTML

<p><img style="display=inline-block;" src="upload://tbEylS4iHyycxJFPT1cnaUFc17U.png" alt="Check" data-base62-sha1="tbEylS4iHyycxJFPT1cnaUFc17U" width="15" height="15"> Solved by <a href="">Pixlz</a> in <a href="">post #1</a></p>

Just for the funny in a PM to trick some friends, it should work like this. (taken from a discourse test site)

It works for 5 minutes, but @system auto edits it and it breaks, turning into markdown.

Note that Discourse also does this, but it weirdly doesn’t break like it does here.

Trying to put the upload:// as the image doesn’t work, it only works on a real website, which is why it isn’t working.

It ends up doing this for some reason, it changes after about 5 minutes

What I posted is just an example of this, it does it to any image embedded within HTML.

1 Like

It seems that it could be related with not having a blank line before the image tag, the paragraph tag (<p>) must be on a different line to the image tag (<img>) this is reported as a bug on the Discourse Meta forum.

It auto converts into an image and gets rid of the <`img> tag. Markdown doesn’t work within 2 lines of HTML code, so is this a Discourse issue? I can report it there, but often I dont get a response, I get a response from somebody in “Team” saying “That shouldn’t happen” and nothing further happens, or somebody tells me to fix that in the admin panel.

(no hate to the discourse team, they’re all pretty chill)

Alright, I went and reported it to Discourse instead, hopefully they can do something about it

Was just confirmed that it was fixed, but the DevForum is on an older version, I just DM’d an admin asking about updating it

1 Like

Please use the public forum posts instead of DMing particular staff, that way all of us can see the request!

We generally only schedule updates to the forum at set dates or when important security patches are released by the Discourse team. This is a very low-impact issue so it will be picked up the next time an update happens.