Adium

Changeset 24472

Show
Ignore:
Timestamp:
07/21/2008 08:19:51 PM (6 months ago)
Author:
sholt
Message:

Since [23560], we scanned all messages to see if the whole message was a link. This invalidated the assumption that text passed to the AHLinkLexer would not have spaces in it, leading to #10532.
We now toss any pattern containing whitespace in AHLinkLexer. Includes a new UnitTest. Fixes #10532.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/Frameworks/AutoHyperlinks Framework/Source/AHLinkLexer.l

    r24426 r24472  
    7070ipv6URL         \[{ipv6Address}](:[0-9]+)?{urlPath}? 
    7171 
    72 mailSpec        [^:\/[:space:]]+\@.+\.{TLDs} 
    73 jabberSpec      xmpp:.+\@.+\.{TLDs}{urlPath}?(\?[[:alnum:]]+[;&][^[:space:]]*)? 
     72mailSpec        [^:\/[:space:]]+\@[^[:space:]]+\.{TLDs} 
     73jabberSpec      xmpp:{mailSpec}{urlPath}?(\?[[:alnum:]]+[;&][^[:space:]]*)? 
    7474aolIMSpec       aim:goim\?screenname=[^\ \t\n&]+(&message=.+)? 
    7575aolChatSpec     aim:gochat\?roomname=[^\ \t\n&]+ 
     
    7979rdarSpec        (rdar|radr|radar|x-radar):\/\/(problems?\/)?[0-9]+(&[0-9]+)* 
    8080spotifySpec     spotify:(track|album|artist|search|playlist|user|radio):[^<>]+ 
    81 gtalkSpec       gtalk:(chat|call|gtalk)\?jid=.+\@.+\.{TLDs}(&from_jid=.+\@.+\.{TLDs})? 
     81gtalkSpec       gtalk:(chat|call|gtalk)\?jid={mailSpec}(&from_jid={mailSpec})? 
    8282myimSpec        myim:(addContact|sendIM)\?(((uID|cID)=[0-9]*&?)|(auto=(true|false)&?))+ 
    83 msnSpec         msnim:(chat|add|voice|video)\?contact=.+\@.+\.{TLDs
     83msnSpec         msnim:(chat|add|voice|video)\?contact={mailSpec
    8484 
    8585%{ 
  • trunk/Frameworks/AutoHyperlinks Framework/UnitTests/NegativeURLTest.m

    r24146 r24472  
    2020        testHyperlink(@"http://example.com/ is not a link"); 
    2121        testHyperlink(@"jdoe@jabber.org/Adium"); 
     22        testHyperlink(@"mailto:test@example.com text xmpp:test@example.com"); 
    2223} 
    2324@end