| 239 | | // Need to unescape entities ourself. & wasn't getting unescaped for some reason. See #6850. |
|---|
| 240 | | // 10 for </message> and 1 for the index being off |
|---|
| 241 | | message = [[inputFileString substringWithRange:NSMakeRange(messageStart, end - messageStart - 11)] stringByUnescapingFromXMLWithEntities:nil]; |
|---|
| | 239 | /* Need to unescape & now so that we'll do link detection properly when decoding the HTML. See #6850. |
|---|
| | 240 | * We'll let HTML decoding handle the other entities. |
|---|
| | 241 | * |
|---|
| | 242 | * 11 = 10 for </message> and 1 for the index being off |
|---|
| | 243 | */ |
|---|
| | 244 | NSMutableString *mutableMessage = [[inputFileString substringWithRange:NSMakeRange(messageStart, end - messageStart - 11)] mutableCopy]; |
|---|
| | 245 | [mutableMessage replaceOccurrencesOfString:@"&" |
|---|
| | 246 | withString:@"&" |
|---|
| | 247 | options:NSLiteralSearch |
|---|
| | 248 | range:NSMakeRange(0, [mutableMessage length])]; |
|---|
| | 249 | message = [mutableMessage autorelease]; |
|---|