adium 2947:946998a6e1d3: The context was being read in properly,...
commits at adium.im
commits at adium.im
Mon Nov 23 05:52:30 UTC 2009
details: http://hg.adium.im/adium/rev/946998a6e1d3
revision: 2947:946998a6e1d3
author: Zachary West <zacw at adium.im>
date: Mon Nov 23 00:38:57 2009 -0500
The context was being read in properly, we were just mis-parsing the Twitter end of it, which now works fine. Refs #13447 which didn't need this change.
(transplanted from 13548a608dd34e2070852af8009b73ceec3ae2db)
Subject: adium 2948:d6aaf75d0c6c: At some point in time, the need to replace & with & to allow linking to work died off. Do not try to mess with the URL at all. Fixes #13382.
details: http://hg.adium.im/adium/rev/d6aaf75d0c6c
revision: 2948:d6aaf75d0c6c
author: Zachary West <zacw at adium.im>
date: Mon Nov 23 00:46:43 2009 -0500
At some point in time, the need to replace & with & to allow linking to work died off. Do not try to mess with the URL at all. Fixes #13382.
Because & was being replaced with &, any following # were considered part of a &#…; sequence, which was causing some serious misparsing. By removing both the &->& and #->#, we kill two birds with one stone.
(transplanted from ba94093fbed86ca07cd2261c28a1b19a34da487e)
diffs (49 lines):
diff -r 498ff9132c16 -r d6aaf75d0c6c Source/AIXMLChatlogConverter.m
--- a/Source/AIXMLChatlogConverter.m Mon Nov 23 00:23:17 2009 -0500
+++ b/Source/AIXMLChatlogConverter.m Mon Nov 23 00:46:43 2009 -0500
@@ -250,22 +250,8 @@
CFIndex end = CFXMLParserGetLocation(parser);
NSString *message = nil;
if (!empty) {
- /* Need to unescape & now so that we'll do link detection properly when decoding the HTML. See #6850.
- * We'll let HTML decoding handle the other entities.
- *
- * 11 = 10 for </message> and 1 for the index being off
- */
- NSMutableString *mutableMessage = [[inputFileString substringWithRange:NSMakeRange(messageStart, end - messageStart - 11)] mutableCopy];
- [mutableMessage replaceOccurrencesOfString:@"&"
- withString:@"&"
- options:NSLiteralSearch
- range:NSMakeRange(0, [mutableMessage length])];
- // Escape anchor tags
- [mutableMessage replaceOccurrencesOfString:@"#"
- withString:@"#"
- options:NSLiteralSearch
- range:NSMakeRange(0, [mutableMessage length])];
- message = [mutableMessage autorelease];
+ // 11 = 10 for </message> and 1 for the index being off
+ message = [inputFileString substringWithRange:NSMakeRange(messageStart, end - messageStart - 11)];
}
NSString *shownSender = (senderAlias ? senderAlias : sender);
NSString *cssClass;
diff -r 498ff9132c16 -r d6aaf75d0c6c Source/DCMessageContextDisplayPlugin.m
--- a/Source/DCMessageContextDisplayPlugin.m Mon Nov 23 00:23:17 2009 -0500
+++ b/Source/DCMessageContextDisplayPlugin.m Mon Nov 23 00:46:43 2009 -0500
@@ -354,7 +354,7 @@
}
else if ([elementStack count]) {
AIXMLElement *element = [AIXMLElement elementWithName:elementName];
- [(AIXMLElement *)[elementStack objectAtIndex:0U] insertEscapedObject:element atIndex:0U];
+ [(AIXMLElement *)[elementStack objectAtIndex:0U] insertObject:element atIndex:0U];
[elementStack insertObject:element atIndex:0U];
}
}
@@ -362,7 +362,7 @@
- (void)parser:(LMXParser *)parser foundCharacters:(NSString *)string
{
if ([elementStack count])
- [(AIXMLElement *)[elementStack objectAtIndex:0U] insertEscapedObject:string atIndex:0U];
+ [(AIXMLElement *)[elementStack objectAtIndex:0U] insertObject:string atIndex:0U];
}
- (void)parser:(LMXParser *)parser elementStarted:(NSString *)elementName attributes:(NSDictionary *)attributes
More information about the commits
mailing list