I was putting together a question on stackapps (quickly answered) asking about the new API filters. I wanted to link to some relevant API docs pages with the filters already specified, but it refused to recognize the URL in the markdown.


Attempted as markdown: [some url](http://api.stackexchange.com/docs/sites#filter=!6ot9yf2tHd-0A(WH5pXrL9xuH_(.UL3EF-uBGL&run=true)

I don't deny the filter ID makes these URLs very ugly, so maybe it isn't supposed to work with exclamation points and parentheses. I simply ran the URLs through a shortener to fix the issue.

  • 1
    You've got a couple of open parentheses there in the URL that are unencoded. They're hosing the Markdown.
    – user102937
    Jan 12, 2012 at 3:40

2 Answers 2


That link isn't correctly encoded. If you use the link button in the editor toolbar, any url entered there will be encoded.

  • It looks like the editor is doing an equivalent of JavaScript's encodeURIComponent, but that doesn't alter the characters of the filter at all. I'm curious if those characters only require encoding to markdown and not for overall URI requirements.
    – patridge
    Jan 12, 2012 at 13:59

In Markdown, you must "backslash escape" parenthesis within such embedded components as a link. This code will work as expected (I have indicated the backslashes with carats):

[some url](http://api.stackexchange.com/docs/sites#filter=!6ot9yf2tHd-0A\(WH5pXrL9xuH_\(.UL3EF-uBGL&run=true)
                                                                        ^             ^

Example of it working: some url

You must log in to answer this question.

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