5
\$\begingroup\$

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.

| |
\$\endgroup\$
3
\$\begingroup\$

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

| |
\$\endgroup\$
  • \$\begingroup\$ 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? \$\endgroup\$ – Kellenjb Feb 20 '12 at 16:46
  • \$\begingroup\$ 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. \$\endgroup\$ – Shog9 Feb 20 '12 at 17:54
  • \$\begingroup\$ 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. \$\endgroup\$ – Kellenjb Feb 20 '12 at 18:09
  • \$\begingroup\$ Sure - just leave off the http:// bit (or surround the entire URL with backticks `) and it won't get linked. \$\endgroup\$ – Shog9 Feb 20 '12 at 18:11

You must log in to answer this question.

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