Undo the part of [3855f70905bd]: It caused strings to be incorrectly escaped and causing our XML parsing to break. Rather, escape hash-symbols when parsing in XML data as not to confuse AIHTMLDecoder. Refs #8141. Fixes #12856.
authorStephen Holt <sholt@adium.im>
Wed Aug 26 13:17:35 2009 -0400 (2009-08-26)
changeset 259707e07f9788a6
parent 2596 387091087c49
child 2598 08f5b3c1e169
Undo the part of [3855f70905bd]: It caused strings to be incorrectly escaped and causing our XML parsing to break. Rather, escape hash-symbols when parsing in XML data as not to confuse AIHTMLDecoder. Refs #8141. Fixes #12856.
Frameworks/Adium Framework/Source/AIXMLElement.m
Source/AIXMLChatlogConverter.m
     1.1 --- a/Frameworks/Adium Framework/Source/AIXMLElement.m	Sat Aug 22 23:10:25 2009 -0400
     1.2 +++ b/Frameworks/Adium Framework/Source/AIXMLElement.m	Wed Aug 26 13:17:35 2009 -0400
     1.3 @@ -230,7 +230,7 @@
     1.4  			} else if ([value respondsToSelector:@selector(absoluteString)]) {
     1.5  				value = [(NSURL *)value absoluteString];
     1.6  			}
     1.7 -			[string appendFormat:@" %@=\"%@\"", key, value];
     1.8 +			[string appendFormat:@" %@=%@", key, [self quotedXMLAttributeValueStringForString:value]];
     1.9  		}
    1.10  	}
    1.11  	if ((![contents count]) && (selfCloses)) {
     2.1 --- a/Source/AIXMLChatlogConverter.m	Sat Aug 22 23:10:25 2009 -0400
     2.2 +++ b/Source/AIXMLChatlogConverter.m	Wed Aug 26 13:17:35 2009 -0400
     2.3 @@ -260,6 +260,11 @@
     2.4  													withString:@"&"
     2.5  													   options:NSLiteralSearch
     2.6  														 range:NSMakeRange(0, [mutableMessage length])];
     2.7 +					// Escape anchor tags
     2.8 +					[mutableMessage replaceOccurrencesOfString:@"#"
     2.9 +													withString:@"&#x23;"
    2.10 +													   options:NSLiteralSearch
    2.11 +														 range:NSMakeRange(0, [mutableMessage length])];
    2.12  					message = [mutableMessage autorelease];
    2.13  				}
    2.14  				NSString *shownSender = (senderAlias ? senderAlias : sender);