Display of images in links break if they contain parenthesis

סיכום מבוסס בינה מלאכותית

The discussion addresses a bug where displaying images in links breaks when the image URL contains parentheses. pfaffman demonstrates the issue with a Markdown link that includes a URL with parentheses, noting that the Markdown renderer fails to handle it correctly. codinghorror suggests using URL-encoded versions of parentheses as a workaround, referencing a Meta Stack Exchange post. pfaffman clarifies the issue is specific to image links with parentheses in the URL and acknowledges the solution after realizing the need to encode them. sam confirms the issue is resolved, showing the correct syntax and linking to a CommonMark testing thread.

To reproduce:

[![Some text](https://example.com/stupid(66)filename.png)](https://example.com/stupid(66)filename.png)

Of course, a better solution might be to include just the raw image link on a line by itself. I may just need to deal with image links more elegantly. . .

לייק 1

See

2 לייקים

I’d checked that. It’s not links to urls with parentheses that I’m having with, but links to URLs containing parentheses when the displayed text is an image whose url contains a parenthesis. In html, it’d be

<a href="http://x.com/really(silly)filename.png"><img src="http://x.com/really(silly)filename.png"></a>

I am pretty sure that this won’t work in our Markdown (the code that generates that markdown works fine if the image URL doesn’t contain parentheses) and that what I need to do is for such links, just replace the whole thing with

http://x.com/really(silly)filename.png

I can’t imagine that a human would ever do it the other way, so I’ll just have to cowboy up and deal with images that contain parentheses some other way (or even just all display-an-image-with-a-link-to-the-image instances).

Replace the parens with the URL encoded versions per the link I posted…

3 לייקים

Apparently I was capable of reading only the other 6 ways. :frowning:

Thanks.

2 לייקים

This now looks right to me:

[![Some text](https://example.com/stupid(66)filename.png)](https://example.com/stupid(66)filename.png)
לייק 1