Bug: URLs sent in chat messages sometimes don't work properly
I have contacts on Toxy who will sometimes send chat messages including URLs. If the user doesn't include a space between the last thing they typed and the URL, the previous word gets highlighted as part of the URL.
For example, if I typed the following message: "Hey, check this out:www.google.com", the underlined URL would be "out:www.google.com". Clicking on this obviously doesn't work because the browser can't interpret the "out:" portion.
Furthermore, using shift+enter (without including a space) and pasting the URL results in the same behavior:
Hey, check this out: www.google.com
This still results in the URL appearing as:
Hey, check this "out: www.google.com"
(Quotes used to show what is included in the clickable URL).
Can this behavior be changed so that only the appropriate URL characters are underlined?
Thanks!
I found a good regex on SO that solve the described problem: http://stackoverflow.com/questions/861409/wpf-making-hyperlinks-clickable But of course further tests needed and also the regex must be extended to support protocols like file:///