Adium

Changeset 21112

Show
Ignore:
Timestamp:
09/25/2007 02:26:17 AM (1 year ago)
Author:
cbarrett
Message:

Unescape url entities when decoding chatlogs. Fixes #6850.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/Source/GBChatlogHTMLConverter.m

    r20460 r21112  
    236236                                CFIndex end = CFXMLParserGetLocation(parser); 
    237237                                NSString *message = nil; 
    238                                 if(!empty) 
    239                                         message = [inputFileString substringWithRange:NSMakeRange(messageStart, end - messageStart - 11)];  // 10 for </message> and 1 for the index being off 
     238                                if (!empty) { 
     239                                        NSString *unescapedMessage = [inputFileString substringWithRange:NSMakeRange(messageStart, end - messageStart - 11)];  // 10 for </message> and 1 for the index being off 
     240                                        // Need to escape these, & wasn't getting unescaped. #6850 
     241                                        message = (NSString *)CFXMLCreateStringByUnescapingEntities(kCFAllocatorDefault, (CFStringRef)unescapedMessage, NULL); 
     242                                        [message autorelease]; 
     243                                } 
    240244                                NSString *shownSender = sender; 
    241245                                NSString *cssClass;