Toxy icon indicating copy to clipboard operation
Toxy copied to clipboard

Bug: URLs sent in chat messages sometimes don't work properly

Open hyph3n opened this issue 10 years ago • 1 comments

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!

hyph3n avatar Apr 17 '15 16:04 hyph3n

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:///

schulz3000 avatar Apr 25 '15 19:04 schulz3000