Xshell Forum

Clickable URL hyperlinks in parentheses

Last post: Monday, March 30, 2015 2:33 AM by Support, 7 reply

 
Tuesday, March 24, 2015 12:27 PM - JohnW

Clickable URL hyperlinks in parentheses

 
I would like to have URL hyperlinks clickable if they are surrounded by parentheses () or brackets [] or braces {}

(http://google.com)

[http://google.com]

{http://google.com}

Currently, none of these types of URLs are clickable. URLs are only clickable if there are spaces around the URLs.

Program Ver. : Xshell 5
Tuesday, March 24, 2015 12:30 PM - JohnW

Re: Clickable URL hyperlinks in parentheses

 
It would also probably be helpful to include:

<http://google.com>

|http://google.com|

"http://google.com"

'http://google.com'

`http://google.com`

_http://google.com_
Wednesday, March 25, 2015 1:37 AM - Support

Re: Clickable URL hyperlinks in parentheses

 
Thank you for requesting this feature. It has been reported and the case # if 3067.

Is there any reason why you would only want the URL inside these parenthesis to work? What's the benefit of this feature over making any URL clickable regardless of where it's located inside the terminal.


---
Technical Support
Wednesday, March 25, 2015 10:28 PM - JohnW

Re: Clickable URL hyperlinks in parentheses

 
You misunderstand. I would be happy with any URL being clickable.

The problem is that any URL is NOT clickable currently. It is only clickable if there is a space before it.
Thursday, March 26, 2015 12:31 AM - Support

Re: Clickable URL hyperlinks in parentheses

 
I understood your request. I was just wondering about your second posting. But, it was requested to our developers as you requested.

---
Technical Support
Thursday, March 26, 2015 3:02 PM - JohnW

Re: Clickable URL hyperlinks in parentheses

 
Well, there are at least two ways the problem could be addressed:

1) Make URLs clickable if they are surrounded by spaces or other specific characters like (parenthesis), [brackets], etc.

2) Make URLs clickable no matter what characters they are embedded inside.

I can see that (2) might cause some problems in certain situations. For example, I see that Xshell has default definitions for ftp: and sftp:

So, if it allows arbitrary characters before the URL, how does it decide whether to treat

filesftp://somehost.com

as ftp or sftp?

Also problematic could be something like

s_http://google.com_http://yahoo.com_g

What URL would it parse? If you allow arbitrary characters before and after, it would probably end up with the invalid URL:

http://google.com_http://yahoo.com_g

instead of two valid URLs:

http://google.com
http://yahoo.com

If you use technique (1) above, I think it would properly parse the two URLs (assuming that _underscore_ characters are included as one of the valid delimiters).
Thursday, March 26, 2015 3:38 PM - JohnW

Re: Clickable URL hyperlinks in parentheses

 
On second thought, _underscores_ are a bad example. In fact, several of the delimiters I suggested are a bad idea. It seems (parenthesis) are valid characters in a URL.

So please update my request. Please add to the list of delimiters that enable parsing of a clickable URL. Instead of just spaces, include spaces plus any other character that is considered "unsafe" in URLs.

This article
http://perishablepress.com/stop-using-unsafe-characters-in-urls/
has a chart summarizing the "unsafe" characters in URLs, in addition to the space character, as defined by RFC 1738:

" < > # % { } | \ ^ ~ [ ] `

Note that (parenthesis) are not on the list. So I guess my original request should be modified to remove parenthesis, and add on the above list of unsafe characters as delimiters for clickable URLs.

Perhaps have a checkmark about whether to keep the current behavior (only use spaces as delimiters) or to use any unsafe characters as delimiters. The reason I suggest this checkbox is because it seems that some organizations are generating URLs containing the unsafe characters, even though it is unwise to do so.

Or even better, allow the user to enter the characters that may delimit a clickable URL. Xshell already allows us to enter delimiting characters for smart selection by double-click. Just add another textbox where we can enter the delimiters for a clickable URL. Have it default to the list of "unsafe" URL characters, but then the user can modify it as they like.

I think that last is the best solution. I would probably modify the list on my installation to add parenthesis to the list of delimiters, since most of the URLs I would be wanting to click would not use parenthesis in the URL, even though it is permitted to do so.
Monday, March 30, 2015 2:33 AM - Support

Re: Clickable URL hyperlinks in parentheses

 
Thank you very much for your elaborate explanation. I can see that this feature can benefit a lot of our Xshell users. I have forwarded your explanation to our developers and it will help us tremendous when brining this feature to life.


---
Techncial support