# Chat creates an improper link when there is a “)” in the URL

In chat, someone tried to post a link to wolfram alpha. Specifically

http://wolframalpha.com/input/?i=(1.25e-6%20amp)*(10%2F(60%20Hz))%2F(3.3%20V)%3D

The link showed up in chat like so:

wolframalpha.com/input/…)*(10%2F(60%20Hz))%2F(3.3%20V)%3D

I am assuming this is by design to allow links to work when someone places them inside ()'s, but it is rather annoying to have to piece together the link after parts of it get hidden by ...'s.

There has got to be a better way to handle this situation.

As you suspected, the problem comes from all the characters that have special meaning in the mini-Markdown formatting language used in chat. By escaping the parentheses (prefixing them with a backslash) and using the full link syntax, you can make even this work:

[wolfram alpha gives farads as an alternative unit](http://wolframalpha.com/input/?i=$$1.25e-6%20amp$$*$$10%2F\(60%20Hz$$\)%2F$$3.3%20V$$%3D)


...which renders as:

wolfram alpha gives farads as an alternative unit

• So instead of figuring out a solution to make things easier for the user, the answer is just, "You are doing it wrong"? I realize there isn't a great solution to this, but I was at least hoping people would have ideas to make it better. Like maybe add in a UI that allows people to add links in chat just like they do in the Q/A part of the site? – Kellenjb Feb 20 '12 at 16:46
• Well, the core problem is that the markup supported by Chat is... Extremely limited. The main sites can afford to support much richer formatting, and therefore avoid these problems to some extent. Interestingly, copying the URL in Firefox automatically encodes most of the problematic characters, specifically for this reason (to avoid problems with systems that try to parse URLs out of free-form text). Another option, though I hate to suggest it, is using a URL shortening service for such links. – Shog9 Feb 20 '12 at 17:54
• Would it be possible to not truncate the URL (the adding the ... part) and have it just show the full text that was pasted? At least in that case someone can just copy and paste the link. This is how it is shown in the chat history anyways. – Kellenjb Feb 20 '12 at 18:09
• Sure - just leave off the http:// bit (or surround the entire URL with backticks `) and it won't get linked. – Shog9 Feb 20 '12 at 18:11