I think the problem is in rails. The auto_link uses a regular expression:
AUTO_LINK_RE = %r{
( # leading text
<\w+.*?>| # leading HTML tag, or
[^=!:'"/]| # leading punctuation, or
^ # beginning of line
)
(
(?:https?://)| # protocol spec, or
(?:www\.) # www.*
)
(
[-\w]+ # subdomain or domain
(?:\.[-\w]+)* # remaining subdomains or
domain
(?::\d+)? # port
(?:/(?:[~\...@%=\(\)-]|(?:[,.;:'][^\s$]))*)* #
path
(?:\?[\...@%&=.;:-]+)? # query string
(?:\#[\w\-]*)? # trailing anchor
)
([[:punct:]]|<|$|) # trailing text
}x unless const_defined?(:AUTO_LINK_RE)
(from vendor/rails/actionpack/lib/action_view/helpers/text_helper.rb)
Although I'm not very good at regular expressions, I cannot spot { or } in
the query string part or the path part of the expression. I think that is
why auto_link does not take the complete url.
Reinier
> -----Oorspronkelijk bericht-----
> Van: Reinier Balt [mailto:[email protected]]
> Verzonden: vrijdag 7 augustus 2009 9:25
> Aan: 'Hans de Graaff'; '[email protected]'
> Onderwerp: RE: [Tracks-discuss] Re: URL auto-detect slightly busted
>
> It seems to work with the textile syntax
>
> "mail to work
> on":https://mail.google.com/mail/#search/%7Bis%3Aunread+is%3Astarred+is
> %3Adraft%7D/12272188ec71e0f4
>
> This is probably not processed by auto_link...
>
> Reinier
>
> > -----Oorspronkelijk bericht-----
> > Van: [email protected] [mailto:tracks-
> > [email protected]] Namens Hans de Graaff
> > Verzonden: maandag 13 juli 2009 17:56
> > Aan: [email protected]
> > Onderwerp: [Tracks-discuss] Re: URL auto-detect slightly busted
> >
> > On Mon, 2009-07-13 at 07:41 -0400, Luis Villa wrote:
> > >
> >
> https://mail.google.com/mail/#search/%7Bis%3Aunread+is%3Astarred+is%3A
> > > draft%7D/12272188ec71e0f4
> > >
> > > is a valid URL, but whatever code is auto-linkifying URLs in the
> > notes
> > > field only recognizes/auto-links up to /#search/. Any pointers on
> > > where that code is so I can dig into it? Thanks...
> >
> > This appears to be done in app/views/todos/_toggle_notes.rhtml.
> >
> > auto_link is Rails code and the most likely candidate on handling
> this.
> >
> > Kind regards,
> >
> > Hans
_______________________________________________
Tracks-discuss mailing list
[email protected]
http://lists.rousette.org.uk/mailman/listinfo/tracks-discuss