Opened 12 years ago

Closed 11 years ago

#451 closed Defect (Fixed)

URL matching misses trailing slashes (and ! and .)

Reported by: h3h Owned by: timothy
Component: Colloquy (Mac) Version: 2.0 (Mac)
Severity: Minor Keywords:
Cc:

Description

URLs in plain text such as http://test.com/ and http://test.com/test/ should be made into links in their entirety, including the trailing slashes. Right now the trailing slashes are not included in the created hyperlink.

Change History (4)

comment:1 Changed 12 years ago by Joost de Valk (AlthA)

Have the same problem, it's kind of annoying since it takes a redirect on a lot of pages...

comment:2 Changed 12 years ago by florent.bruneau_clqy@…

I find Colloquy's URL catcher very weak. I don't know how you catch your URLs, but I'm used to using the following regexp :
((?:https?|ftp|news)://(?:&|\.*,*[a-z@0-9~%$£µ&i#\-+=_/\?])*)

I made a lot of tests with this regexp. It catches correctly all the URLs Colloquy failed to recognize. And because it has been designed for an nntp client, this regexp can safely be used in order to catch URLs in a real time discussion.

I hope you will find this useful.
Greetings

comment:3 Changed 12 years ago by akempgen

  • Summary changed from URL matching misses trailing slashes to URL matching misses trailing slashes (and ! and .)

from #849: ! and . are missing too, not sure if they are allowed in urls, though

comment:4 Changed 11 years ago by timothy

  • Resolution set to fixed
  • Status changed from new to closed

Fixed in [3383].

Note: See TracTickets for help on using tickets.