adium-1.4 2799:ba94093fbed8: At some point in time, the need to ...
commits at adium.im
commits at adium.im
Mon Nov 23 05:46:49 UTC 2009
details: http://hg.adium.im/adium-1.4/rev/ba94093fbed8
revision: 2799:ba94093fbed8
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.
diffs (28 lines):
diff -r 13548a608dd3 -r ba94093fbed8 Source/AIXMLChatlogConverter.m
--- a/Source/AIXMLChatlogConverter.m Mon Nov 23 00:38:57 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;
More information about the commits
mailing list