Comments you submit will be routed for moderation. If you have an account, please log in first.

Opened 6 years ago

Closed 6 years ago

#143 closed bug (wontfix)

Valid URL string is not highlighted completely

Reported by: padrino Owned by:
Priority: low Milestone:
Component: user interface Version: 2.6
Severity: trivial Keywords:
Cc: OS Platform:
Blocked By: Blocking:
Release Notes:


Valid strings like}6v/,1596

are "cut off" right at the "}", ie. the part "}6v/,1596" isn't taken as part of the URL and is therefor not hightlighted/clickable by YAM

Attachments (0)

Change History (7)

comment:1 Changed 6 years ago by damato

  • Severity changed from minor to trivial
  • Status changed from new to accepted

After having checked the RFC s for URLs and after reading through the internet I think the problem is not so easy. The RFC clearly says that { and } are unsafe characters which should not be used in URLs and thus should not be part of it because they could get altered at all times.

In addition, I can e.g. reduce the URL by that one here:,1596

and it will point me to the very same web page. So I am uncertain if the } character is really forwarded to the webserver there and if so these guys are probably using it for identifying the path where this link has been floating around (e.g. identifying which user clicked the link so that they can send more SPAM :)).

Also e.g. Thunderbird is showing the URL the very same way like we do. But in the end the URL seems to work when I enter it in my web browser. So I am uncertain how we should address that? We do have a very complex regular expression for checking valid URLs and only highlight valid ones.

Don't get me wrong, I am not rejecting your ticket here, all I say is that we need additional thoughts about that and have to discuss it internally first which way we go because if we allow such syntactically incorrect URLs we could more or less completly remove our URL identification and allow all characters. But then somethink like ( would not be possible because we would allow ")" as part of an URL.

So lets say what other developers say about that.

comment:2 Changed 6 years ago by tboeckel

I'd say better stick to the rules. There will always be new and/or other exceptions from what we can detect as a valid URL or not. There is still the possibility to manually copy the complete URL to the clipboard if YAM cannot tell appart normal text and URL. Rules exist to be obeyed, otherwise we are not a bit better than that big company from Redmond, USA.

On the other hand padrino's URL is correctly recognized as such by both IBrowse and OWB. I cannot tell about Firefox or other browsers right now. But if these two programs can handle such URLs then we should also.

Jens, what about adding the curled braces '{' and '}' to the list of valid characters?

comment:3 Changed 6 years ago by damato

Adding '{‘ and '}' of course works in principle and I already tried it locally here. But again the question have to be if we really want to go that road because this would mean that at some point we will get bug reports about other unrecognized URLs which are, looking at the RFC, are not valid URLs. For example, you can for example replace the { in the original URL with ')' and it will also work in OWB and Ibrowser. However, it will end up at the very same page. So should we add '(' as well? But the this would lead to e.g. ( to be recognized as URLs with ) at the end and that's not what the user expects. So this becomes more and more a philosophical question.

comment:4 Changed 6 years ago by padrino

Yes you are right, the link does work without the "garbage", but differently ;)

In its "complete state" it contains a reference to the sender. So this link is inserted to mails, that you sent to a friend and say "here is what we talked about, if you use this link I will get a reward". So its use is being sent and being clicked, that is why it came to my attention.

I wonder if YAM could maybe have setting for URL highlightning, where you could "strict" or "lax"? Just an idea.

Are normal brackets valid? Don't know, whould it be possible (and easy) to check for "open-bracket"http:// and if that's there the first "closing match" is ignored?
Note, I am just asking and not requesting or hoping for anything. :)

comment:5 Changed 6 years ago by damato

In this case an option is not easily possible and IMHO also not what we should do (always limit the number of options, if possible).

The point really is if we should obey the rules (RFC) or if we should adapt our URL highlightning regular expressions and risk that text will be highlighted which is not part of an URL? IMHO we can not please all possible URLs anyway so we should stick with the clear rules even if there might be some URLs we would miss with our URL highlightning engine. But better play safe instead of potentially highlightning things that are not part of an URL (e.g. parenthesis and so on).

However, let's see what the other developers think about that.

comment:6 Changed 6 years ago by opiopi

IMHO the rfc is clear about that.
See: at 2.2.:

'... Other characters are unsafe because gateways and other
transport agents are known to sometimes modify such characters. These
characters are "{", "}", "|", "\", "", "~", ",?", and "`".

All unsafe characters *must* *always* be encoded within a URL.

So the above URL isn't a valid URL and should not highlighted in YAM.

comment:7 Changed 6 years ago by damato

  • Priority changed from undecided to low
  • Resolution set to wontfix
  • Status changed from accepted to closed

Ok. As the other devs seem to have the same opinion I am going to finally close this ticket.

Add Comment

Modify Ticket

as closed The ticket will remain with no owner.
The resolution will be deleted. Next status will be 'reopened'.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.

This list contains all users that will be notified about changes made to this ticket.

These roles will be notified: Reporter, Owner, Subscriber

  • Mario Cattaneo(Reporter, Participant)