adium 2343:e20f4841e08d: Simplify the xmpp parse, as well as fix...
commits at adium.im
commits at adium.im
Tue May 26 18:27:13 UTC 2009
details: http://hg.adium.im/adium/rev/e20f4841e08d
revision: 2343:e20f4841e08d
author: Zachary West <zacw at adium.im>
date: Tue May 26 14:27:00 2009 -0400
Simplify the xmpp parse, as well as fix the conference join link. Adds a unit test for it.
diffstat:
Frameworks/AutoHyperlinks Framework/Source/AHLinkLexer.l | 2 +-
Frameworks/AutoHyperlinks Framework/UnitTests/SimpleURLTest.m | 1 +
2 files changed, 2 insertions(+), 1 deletions(-)
diffs (23 lines):
diff -r ab11a97f4fa8 -r e20f4841e08d Frameworks/AutoHyperlinks Framework/Source/AHLinkLexer.l
--- a/Frameworks/AutoHyperlinks Framework/Source/AHLinkLexer.l Tue May 26 14:02:43 2009 -0400
+++ b/Frameworks/AutoHyperlinks Framework/Source/AHLinkLexer.l Tue May 26 14:27:00 2009 -0400
@@ -71,7 +71,7 @@
userAtDomain [^:@\/[:space:]]+\@{singleDomain}(\.{singleDomain})*
mailSpec {userAtDomain}\.{TLDs}
-jabberSpec xmpp:{mailSpec}{urlPath}?(\?[[:alnum:]]+[;&][^[:space:]]*)?
+jabberSpec xmpp:{mailSpec}{urlPath}?(\?[^[:space:]]+)?
aolIMSpec aim:goim\?screenname=[^\ \t\n&]+(&message=.+)?
aolChatSpec aim:gochat\?roomname=[^\ \t\n&]+
yahooIMSpecOld (ymsgr|yahoo):sendim\?.+
diff -r ab11a97f4fa8 -r e20f4841e08d Frameworks/AutoHyperlinks Framework/UnitTests/SimpleURLTest.m
--- a/Frameworks/AutoHyperlinks Framework/UnitTests/SimpleURLTest.m Tue May 26 14:02:43 2009 -0400
+++ b/Frameworks/AutoHyperlinks Framework/UnitTests/SimpleURLTest.m Tue May 26 14:27:00 2009 -0400
@@ -457,6 +457,7 @@
//Variants with '&' instead of ';': Adium accepts these, although the XEP does not specify them.
testHyperlink(@"xmpp:romeo at montague.net?message&body=Here%27s%20a%20test%20message");
testHyperlink(@"xmpp:romeo at montague.net?message&subject=Test%20Message&body=Here%27s%20a%20test%20message");
+ testHyperlink(@"xmpp:foo at conference.example.com?join");
testHyperlink(@"aim:goim?screenname=adiumx");
testHyperlink(@"aim:goim?screenname=adiumx&message=Hey!+Does+this+work?");
testHyperlink(@"ymsgr:sendim?adiumy");
More information about the commits
mailing list