From 52e4630ba72f8c3eb1875124d40a49bff314d774 Mon Sep 17 00:00:00 2001 From: Stefan Becker Date: Wed, 23 Apr 2014 18:17:40 +0300 Subject: [PATCH] Fix #241: Adium filters ":" from "sip:" The string generated in allowedCharacters method obviously was copy & pasted from another plugin without adapting it to SIPE requirements. Updated the string to be in sync with sipe-utils.c:escape_uri_part(). (cherry picked from commit 38b355b74d303aa6c93cbe9c97ef46045847ec10) --- src/adium/ESSIPEService.m | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/src/adium/ESSIPEService.m b/src/adium/ESSIPEService.m index 9f83e94d..065c809c 100644 --- a/src/adium/ESSIPEService.m +++ b/src/adium/ESSIPEService.m @@ -5,6 +5,7 @@ // Created by Matt Meissner on 10/30/09. // Modified by Michael Lamb on 2/27/13 // Copyright 2013 Michael Lamb/Harris Kauffman. All rights reserved. +// Copyright (C) 2014 SIPE Project // #import @@ -72,11 +73,11 @@ - (NSImage *)defaultServiceIconOfType:(AIServiceIconType)iconType { NSImage *baseImage = [NSImage imageNamed:@"sipe" forClass:[self class]]; - + if ((iconType == AIServiceIconSmall) || (iconType == AIServiceIconList)) { [baseImage setSize:NSMakeSize(16, 16)]; } - + return baseImage; } @@ -86,10 +87,17 @@ { NSMutableCharacterSet *allowedCharacters = [[NSCharacterSet alphanumericCharacterSet] mutableCopy]; NSCharacterSet *returnSet; - - [allowedCharacters addCharactersInString:@"._@-()[]^%#|/\\`=,"]; + + // + // NOTE: needs to be in sync with sipe-utils.c:escape_uri_part() + // + // @ - XXX@YYY + // : - sip:XXX@YYY + // ._-~ - unreserved, see RFC 3986 Appendix A + // + [allowedCharacters addCharactersInString:@"@:._-~"]; returnSet = [allowedCharacters immutableCopy]; - + return [returnSet autorelease]; } @@ -111,10 +119,10 @@ AIAwayStatusType, STATUS_NAME_AWAY_FRIENDS_ONLY, nil ]; - + for (NSString* key in statuses) { AIStatusType value = [statuses objectForKey:key]; - + [adium.statusController registerStatus:key withDescription:[adium.statusController localizedDescriptionForCoreStatusName:key] @@ -126,4 +134,3 @@ @end - -- 2.11.4.GIT