Project

General

Profile

Feature #1414

Expand URI clickability

Added by ryantm almost 6 years ago. Updated about 2 months ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
07/11/2016
Due date:
% Done:

0%

Estimated time:
OS:
Any

Description

Some URIs do not have "//" in their scheme, and are not detected by the scheme regular expression at https://github.com/quassel/quassel/blob/07bda5ad7fa76ac4b5bf6296a325a18ea5da6825/src/uisupport/clickable.cpp#L56

My particular use case is that my company has some internal custom URI schemes that do not use //.

RFC 3986 https://www.ietf.org/rfc/rfc3986.txt shows a couple of examples in section 1.1.2.:

news:comp.infosystems.www.servers.unix
tel:+1-816-555-1212
urn:oasis:names:specification:docbook:dtd:xml:4.1.2

I understand it might not be that great to make links out of everything that has a : in it, so maybe a better approach would be to have a whitelist of schemes available in the UI. This would allow us to remove the special case that currently exists for "mailto:".

History

#1 Updated by counterpillow over 5 years ago

"magnet:" is another candidate for inclusion, and for the academics among us "doi:" might be handy.

FWIW I think there's a good point to be made that this shouldn't be handled in a regex. The current regex already looks quite horrifying, and ideally the whitelist of schemes would be clientside configurable.

#2 Updated by phuzion about 2 months ago

I'm currently working on adding support for these URL schemes, as well as as geo: per #1761.

Could you please provide some examples of URLs you would like to see included? Full URLs, not just the schemes, please.

I do not have magnet: working yet, as our existing regex does not seem to support such a complicated URL.

I have a small patch that adds tel:, geo:, news:, and urn:. If there are any other schemes that people would like to see added, please add them here.

I currently have a WIP PR on GitHub at the following URL: https://github.com/quassel/quassel/pull/608

Also available in: Atom PDF