Fixed markdown image code does not work without alt text?

Chromaniac

Well-known member
Affected version
2.1
i am trying to figure out how to use markdown created by the app sharex i use to upload images.
it creates markdown code without alt text so i get something like this:
![](https://i.imgur.com/V3LCOP8.jpg)
xenforo does not create an image out of this.
i checked an online markdown renderer service and this seems to work there.

was wondering if this is intended behavior? based on further reading, it seems that alt is required for valid html. but xenforo does support bbcode without alt. in fact alt support was just added in 2.1.
 
Roughly speaking, it looks like we need to special case allow this for images. Technically, CommonMark does render an empty link if you provide no text, though that doesn't seem desired in our case. Saying that, we could just render that case as a "simple" URL, which is what our equivalent BB code does anyway.
 
Thank you for reporting this issue. It has now been resolved and we are aiming to include it in a future XF release (2.1.1).

Change log:
Support Markdown image embedding without any alt text and maintain the alt text from Markdown image embeds.
Any changes made as a result of this issue being resolved may not be rolled out here until later.
 
i know this bug is fixed and already rolled out here... just wanted to mention something that i noticed this week. even if i use the alt text in markdown, it is not used after conversion to bbcode!

but it's fixed now. empty alt works. and if alt text is present, it is migrated to bbcode alt field as well. cheers.
 
Back
Top Bottom