@@ -88,10 +88,12 @@ return self; } - (void)dealloc { + [delegate release]; + [cache release]; [name release]; [prefix release]; [ns release]; [attrs release]; @@ -134,11 +136,13 @@ if ([cache length] > 0) { OFString *str; pool = [[OFAutoreleasePool alloc] init]; - str = [cache stringByXMLUnescaping]; + str = [cache + stringByXMLUnescapingWithHandler: + self]; [delegate xmlParser: self foundString: str]; [pool release]; @@ -340,10 +344,12 @@ break; /* Looking for attribute value */ case OF_XMLPARSER_IN_ATTR_VALUE: if (buf[i] == delim) { + OFString *attr_val; + len = i - last; if (len > 0) [cache appendCString: buf + last withLength: len]; @@ -350,11 +356,13 @@ if (attrs == nil) attrs = [[OFMutableDictionary alloc] init]; pool = [[OFAutoreleasePool alloc] init]; - [attrs setObject: [cache stringByXMLUnescaping] + attr_val = [cache + stringByXMLUnescapingWithHandler: self]; + [attrs setObject: attr_val forKey: attr_name]; [pool release]; [cache setToCString: ""]; [attr_name release]; @@ -392,10 +400,16 @@ [cache appendCString: buf + last withLength: len]; return self; } + +- (OFString*)foundUnknownEntityNamed: (OFString*)entity +{ + return [delegate xmlParser: self + foundUnknownEntityNamed: entity]; +} @end @implementation OFString (OFXMLUnescaping) - stringByXMLUnescaping {