Adium

Ticket #7267 (closed defect: fixed)

Opened 1 year ago

Last modified 4 months ago

Greater-than character swept up into link when followed by a period

Reported by: boredzo Assigned to: evands
Priority: normal Milestone: Adium X 1.2.5
Component: Adium UI Version: 1.2svn
Severity: normal Keywords: aihyperlinks
Cc: Patch: None
Pending: 0

Description (Last modified by boredzo)

The auto-linkification system, upon detecting a bracketed bare URL (e.g., <http://adiumx.com/>), sometimes sweeps up the > as part of the link.

This occurs whenever the > is followed by:

  • ‘.’
  • ‘!’
  • ‘?’
  • ‘<’
  • ‘>’

Examples:

Similarly, when the ‘<’ is preceded by a ‘>’, the ‘<’ is assimilated into the link. In the case of one link immediately after another, such as “<http://adiumx.com/><http://adiumx.com/>”, one big link is formed between the outer <>.

The syntax specification for URLs and the syntax specification for HTTP both specify that neither ‘<’ nor ‘>’ is a valid character in a URL pathname.

Change History

07/08/2007 08:29:02 AM changed by boredzo

  • description changed.

Clarified last example by adding a […] note.

08/04/2007 02:50:54 AM changed by edr1084

  • milestone set to Adium X 1.2.

I'm unable to reproduce this so I'm assuming you fixed it in:

(In [20361]) Fixed #7161 by allowing all characters above 0x7f, except 0xf5?\226?\128?\1470xff (which Unicode says don't occur in UTF-8 sequences), in the hostname of a URL. RFC 1738 and RFC 2396 only allow alphanumeric characters here, but it's not possible to fix this ticket and be strict about only allowing alphanumerics, because flex doesn't know Unicode.

08/16/2007 04:18:06 AM changed by zacw

It looks like the examples work now, unless the / is excluded from the URL.

For example: <http://www.adiumx.com/>! is linkified, but not <http://www.adiumx.com>! and any other end character (., ?, >, <).

10/01/2007 10:55:19 AM changed by jas8522

  • version changed from 1.0.4 to 1.2svn.

with r21197 the examples that zac provides behave like:

<http://www.adiumx.com/>! is indeed linkified but the linkified part is http://www.adiumx.com/> which is not good
<http://www.adiumx.com>! nothing is linkified.

This was tested with MSN and Gtalk though it shouldn't matter.

10/08/2007 02:54:07 PM changed by eharris

  • owner changed from nobody to eharris.
  • status changed from new to assigned.

10/30/2007 03:52:44 AM changed by evands

  • milestone changed from Adium X 1.2 to Adium X 1.2.1.

01/10/2008 01:17:53 PM changed by evands

  • milestone changed from Adium X 1.2.1 to Adium X 1.2.3.

01/12/2008 10:47:39 AM changed by evands

  • milestone changed from Adium X 1.2.3 to Adium X 1.2.4.

04/03/2008 03:35:15 PM changed by evands

  • owner changed from eharris to evands.
  • status changed from assigned to new.

04/03/2008 03:35:39 PM changed by evands

  • status changed from new to assigned.

6 months goes beyond the statute of limitations on ticket ownership for a buglet. I get bug!

04/03/2008 03:35:52 PM changed by evands

  • status changed from assigned to closed.
  • resolution set to fixed.

(In [23057]) Trim off all invalid opening or trailing characters, not just the first we find. Fixes #7267

04/03/2008 03:36:45 PM changed by evands

(In [23058]) Merged [23057]: Trim off all invalid opening or trailing characters, not just the first we find. Fixes #7267

04/03/2008 04:57:07 PM changed by boredzo

(In [23061]) Added unit tests for SHHyperlinkScanner. Refs #7267, and partially disproves r23057. Two of these tests fail.

04/03/2008 05:00:04 PM changed by boredzo

(In [23062]) Merged r23061 from trunk: Added unit tests for SHHyperlinkScanner. Refs #7267, and may partially disprove r23058. Two of these tests fail.

04/03/2008 05:01:58 PM changed by boredzo

  • status changed from closed to reopened.
  • resolution deleted.

Reopening because I derived the test cases in r23061 and r23062 from this ticket, so the two that fail mean that this ticket is not yet fully fixed.

(BTW: I love unit testing.)

04/03/2008 05:26:03 PM changed by eharris

Fair enough, not really sure this was a UI bug anyway, which is why I claimed it since I like those and all.

04/03/2008 05:33:07 PM changed by evands

  • status changed from reopened to closed.
  • resolution set to fixed.

(In [23063]) Properly trim the whole set of invalid characters, not just a subset of them. Fixes #7267, and all tests now pass.

04/03/2008 05:33:47 PM changed by evands

(In [23064]) Reverted [23063], which was clearly not what I meant to commit. Refs #7267

04/03/2008 05:34:07 PM changed by evands

(In [23065]) Properly trim the whole set of invalid characters, not just a subset of them. Fixes #7267, and all tests now pass.

04/03/2008 05:34:37 PM changed by evands

(In [23066]) Merged [23065]: Properly trim the whole set of invalid characters, not just a subset of them. Fixes #7267, and all tests now pass.

04/03/2008 05:46:19 PM changed by boredzo

(In [23067]) Added test cases for the rest of the characters that nextURLFromString: may trim. Refs #7267.

04/03/2008 05:47:56 PM changed by boredzo

(In [23068]) Merged r23067 from trunk: Added test cases for the rest of the characters that nextURLFromString: may trim. Refs #7267.