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.
1.1 --- a/Source/AIXMLChatlogConverter.m Mon Nov 23 00:38:57 2009 -0500
1.2 +++ b/Source/AIXMLChatlogConverter.m Mon Nov 23 00:46:43 2009 -0500
1.3 @@ -250,22 +250,8 @@
1.4 CFIndex end = CFXMLParserGetLocation(parser);
1.5 NSString *message = nil;
1.6 if (!empty) {
1.7 - /* Need to unescape & now so that we'll do link detection properly when decoding the HTML. See #6850.
1.8 - * We'll let HTML decoding handle the other entities.
1.9 - *
1.10 - * 11 = 10 for </message> and 1 for the index being off
1.11 - */
1.12 - NSMutableString *mutableMessage = [[inputFileString substringWithRange:NSMakeRange(messageStart, end - messageStart - 11)] mutableCopy];
1.13 - [mutableMessage replaceOccurrencesOfString:@"&"
1.14 - withString:@"&"
1.15 - options:NSLiteralSearch
1.16 - range:NSMakeRange(0, [mutableMessage length])];
1.17 - // Escape anchor tags
1.18 - [mutableMessage replaceOccurrencesOfString:@"#"
1.19 - withString:@"#"
1.20 - options:NSLiteralSearch
1.21 - range:NSMakeRange(0, [mutableMessage length])];
1.22 - message = [mutableMessage autorelease];
1.23 + // 11 = 10 for </message> and 1 for the index being off
1.24 + message = [inputFileString substringWithRange:NSMakeRange(messageStart, end - messageStart - 11)];
1.25 }
1.26 NSString *shownSender = (senderAlias ? senderAlias : sender);
1.27 NSString *cssClass;