17

The link [Wolfram Alpha](https://www.wolframalpha.com/input/?i=nextprime((10%5E32)%5E2) looks fine in preview, but is broken after submitting the question or answer:

ok in preview

broken after submit

A workaround is to use the [...][1] syntax.

I don't think this is a duplicate of allow n-dashes in link URLs. This issue seems to be related to the round brackets.

8
  • 2
    Yes, it is the parentheses ("round brackets"). You can escape them with backslashes, and it renders fine after submission: [Wolfram Alpha](https://www.wolframalpha.com/input/?i=nextprime\(\(10%5E32\)%5E2)
    – Cody Gray Mod
    Commented Apr 25, 2019 at 23:15
  • @CodyGray: thanks for confirming it. Of course I don't want to escape the braces. Especially if there is already a markdown parser that does a good job :-) Commented Apr 25, 2019 at 23:24
  • 3
    Nick A's answer shows that you're missing a closing parenthesis. If you add that the link works in the final version without escaping, but the preview will have a spurious trailing parenthesis. This is the real bug here. Commented Apr 27, 2019 at 8:43
  • @CodyGray URL encoding them would be far better than escaping.
    – jpmc26
    Commented Apr 28, 2019 at 1:58
  • 1
    @jpmc26 ( and ) are allowed in URL, so "URL encoding" will leave them untouched, maybe you meant percent encoding, but I don't see how this would be "far better", since the problem here is not with the URL resolution, but with the markup syntax, escaping seems more appropriate.
    – Kaiido
    Commented Apr 28, 2019 at 15:29
  • 1
    @Kaiido Percent encoding and URL encoding are not distinct terms: en.wikipedia.org/wiki/Percent-encoding. Parentheses are reserved characters according to RFC 3986, so encoding them would be the better idea.
    – jpmc26
    Commented Apr 28, 2019 at 15:34
  • @jpmc26 I stand corrected, ecmascript's encodeURIComponent do not touch it though nor does FF address bar. But still the problem is with markup, not the url (and even the preview implementation of the markup sytax), so as a workaround for thos issue, escaping sounds correct.
    – Kaiido
    Commented Apr 28, 2019 at 15:49
  • 2
    @Kaiido I find escaping to be less practical as well, since it means that copying the link from the source of the markup will no longer work without manual modification. Both escaping and encoding require manual effort from the person creating the markup, but escaping requires no effort from people later trying to use it. Ideally, the bugs would be fixed, but when possible, I find it easier to just avoid using characters a language considers special in other ways. URL encoding lets you do that.
    – jpmc26
    Commented Apr 28, 2019 at 15:55

2 Answers 2

26

You're missing a closing bracket: [Wolfram Alpha](https://www.wolframalpha.com/input/?i=nextprime((10%5E32)%5E2)) results in: Wolfram Alpha.

Note the extra closing bracket at the end:

[...](...((10%5E32)%5E2)
vs
[...](...((10%5E32)%5E2))
4
  • 9
    So the question should be closed as a typo :P And the real bug is that the preview shows a spurious ending parenthesis in the above valid case. Commented Apr 27, 2019 at 8:42
  • 7
    In preview, an extra parenthesis appears after the link when using the correct number of parentheses. This is also a bug and would lead to users removing the closing parenthesis.
    – jpmc26
    Commented Apr 28, 2019 at 2:01
  • 13
    Question should definitely not be closed as a typo. Yes, he's missing a closing bracket, but it's still a bug that preview shows something different from actual result.
    – eis
    Commented Apr 28, 2019 at 9:09
  • IMO it's still good practice to just percent-encode the URLs anyway. After all, what if you one day need to link a URL that contains unbalanced parentheses? Commented Jan 25, 2023 at 20:10
2

This appears to have been resolved. However, I've updated to deferred vs completed since our team will be taking some time in the future to test and confirm that is indeed the case.

0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .