Adium

Opened 15 years ago

Closed 12 years ago

Last modified 12 years ago

#1031 closed defect (fixed)

Links in adium exclude an ending "."

Reported by: anonymous Owned by: nobody
Milestone: Adium 1.3 Component: Adium UI
Version: Severity: normal
Keywords: Links Cc:
Patch Status:

Description

If a link in adium ends in a period then the period is placed outside of the tag delimeters.However some URLs end in periods. Especially some deep-linking URLs which might commonly be pasted into Adium window. I suggest that if a link is created by pasting in a line that a) is a link and b) ends in a period then the period should be treated as part of the link.

Try linking to a digg article that ends in a period. For example: http://digg.com/links/Why_Rush_Limbaugh_is_not_on_iTunes.

Just a thought.

Change History (18)

comment:1 Changed 15 years ago by Augie Fackler

Resolution: wontfix
Status: newclosed

Technically that's a poorly constructed link, since the dot should be used to separate a file ending. Also, that would break the autolinking for sentences that end in a url, which I think is probably a more common occurrence. Anyone objecting, feel free to reopen the ticket, but this is really a Digg problem IMO. Worst case, you hit Command-K, paste, tab, paste and you're there anyway.

comment:2 Changed 15 years ago by Peter Hosey

the current behaviour is 'correct' (i.e. more useful) for when you enter an URL directly:

please go to http://www.adiumx.com/.

however, this ticket seems to refer to pasting links from, e.g., Safari or TextEdit. the same bug also happens with the Edit Link command - even if the URL in that sheet ends with a full stop, there will not be one at the end in the final link.

comment:3 Changed 15 years ago by Peter Hosey

Resolution: wontfix
Status: closedreopened

comment:4 Changed 15 years ago by Peter Hosey

durin42 and I have just tested it, and it works (full stop is preserved) in 0.90svn (me on [12932], him on [12950]), unless:

  • the link was entered directly into the inputline (as mentioned in my previous comment).
  • the link has no filename other than the punctuation, for example: http://www.adiumx.com/.

I maintain that for a pasted, dragged, or manually-created (Edit Link) link, any punctuation at the end of the pathname - whether there's anything else or not - should be preserved. only when the URL is entered directly into the inputline should we start trying to figure out what the user meant.

comment:5 Changed 15 years ago by Evan Schoenberg

Milestone: Adium X 0.83Adium X 0.84

comment:6 Changed 15 years ago by Chris Forsythe

Milestone: Adium X 0.85Adium X 0.90
Version: 0.82

Moving to .90

comment:7 Changed 15 years ago by Peter Hosey

Resolution: invalid
Status: reopenedclosed

so, yeah. if you want to enter a link that ends with a full stop, use Edit Link. when you don't (99% of the time), the current behaviour is correct.

comment:8 Changed 15 years ago by David Smith

Milestone: Adium X 1.0

comment:9 Changed 12 years ago by Peter Hosey

Patch Status: None
pending: 0
Resolution: invalid
Status: closedreopened

Reading this again (three years later!), I think it's actually a good idea.

Here's the use-case that the submitter was talking about:

  1. Copy a link that includes a period (e.g., from your browser's Location field).
  2. Paste that link into Adium's inputline.

I think that it would be a good idea to examine the pasted text to see whether it's a link, and if so, linkify it—even including the period at the end, if there is one.

comment:10 Changed 12 years ago by Stephen Holt

Wether a full-stop is part of a link or punctuation is ambiguous that, to the parser, is just as likely to be one way than the other.

So, we're going to be wrong some of the time either way, and it's my assumption that links ending with a full-stop are much less common than links bordering punctuation.

If there's some way we can look at the context and get greater certainty that the full-stop is part of the link, I'm all for it (so long as the performance drop is acceptable), but I'm not convinced that we're wrong more than 50% of the time with our current scheme.

comment:11 Changed 12 years ago by Stephen Holt

FWIW, I just noticed trac takes the same assumption.

...not that I'm basing any design decisions for AutoHyperlinks off of the way trac does things.

comment:12 Changed 12 years ago by Peter Hosey

earthmkii: I'm talking about the case where the user pastes a URL alone. If there's a period at the end of the pasted URL, we should include that period in the link we create (both the href and the title), since it probably is part of the URL in that case.

For example, suppose I copy the URL from this ticket's description. My clipboard would then contain:

http://digg.com/links/Why_Rush_Limbaugh_is_not_on_iTunes.

That, and nothing else.

Then I go to paste it. Adium should look at the clipboard, see that it contains a URL (with period), and use the whole URL (with period) for the link.

comment:13 Changed 12 years ago by Stephen Holt

Well, in that case, why bother looking at the URL at all?

I know exactly where to put this, should be fairly simple.

comment:14 Changed 12 years ago by Peter Hosey

earthmkiii: The reason to look at it and see whether it's a URL is to determine whether to wrap it in a link (as if the user had gone through the “Edit Link” hoop). That way, the recipient's client won't exclude the period, since it will be in the href of the link.

comment:15 Changed 12 years ago by Stephen Holt

sorry, should have said, "why bother looking at the clipboard" there. I blame the lack of sleep.

comment:16 Changed 12 years ago by sholt

Resolution: fixed
Status: reopenedclosed

(In [23560]) Check to see if the entire attributed string validates as a link. If it does, link it without considerations to punctuation. Fixes #1031

comment:17 Changed 12 years ago by Stephen Holt

Milestone: Adium X 1.3

comment:18 Changed 12 years ago by sholt

(In [23787]) [23560] linkified all message strings that were links in themselves, this caused problems as we didn't check links strictly and some links became relative links to the message view resources. We now only linkify strings that are links in themselves using strict checking.

  • Added hooks in AHHyperlinkScanner to allow the default strictness to be overrided at runtime.
  • Modified AIAutoLinkingPlugin to use strict checking for it's whole-message-link checking.
  • Fixes #9944
  • Refs #1031
Note: See TracTickets for help on using tickets.