So I just happened across a comment on space.SE that contains a link to the URL https://johnlewis.scene7.com/is/image/JohnLewis/235948306?$prod_exlrg$. (It's a picture of a camera, in case you're wondering.) Here on meta.SE, that URL looks just fine when autolinked. On space.SE however, with MathJax enabled, it looks like this:

Screenshot of unintentional MathJax in autolinked URL

While this is a pretty minor issue, I think we can all agree that this is not desirable behavior. In URLs, just like in program code, dollar signs should not be treated as math delimiters.

FWIW, this would be an easy fix if only the SE (Mini-)Markdown parser would add some distinctive class name to autolinks (i.e. links that lack an explicit link text, and just have the URL shown in its place), since then it would be easy to configure MathJax to ignore any elements with that class name. But without that feature, fixing this would require either modifying the parser to add such a class, or else some pretty ugly and unreliable client-side hackery to make MathJax try to detect autolinks by other means (e.g. by comparing the link text with the href attribute). So I'm not holding my breath waiting for this to get fixed, but I figured it was worth a report anyway.

Ps. After posting this report, I noticed another bug / inconsistency with the URL above: apparently, it gets autolinked just fine in comments and in the live Markdown preview, but the server-side post Markdown parser cuts off the URL before the ?$, like this: https://johnlewis.scene7.com/is/image/JohnLewis/235948306?$prod_exlrg$

However, this is really a separate issue, and should be reported separately if it hasn't been reported already.

You must log in to answer this question.

Browse other questions tagged .