mirror of
https://github.com/sparkle-project/Sparkle
synced 2026-11-25 04:47:55 +00:00
Added support for entities in enclosure paths. Thanks to Stuart Morgan.
This commit is contained in:
1 parent
9d342f117c
commit
8fbfa3a46f
1 file changed
+8
-1
@@ -317,7 +317,14 @@ int compareNewsItems(id item1, id item2, void *context)
|
||||
id keyEnumerator = [(NSDictionary *)websiteInfo->attributes keyEnumerator], current;
|
||||
while ((current = [keyEnumerator nextObject]))
|
||||
{
|
||||
[enclosureDictionary setObject:[(NSDictionary *)websiteInfo->attributes objectForKey:current] forKey:current];
|
||||
NSString *escapedAttributeValue = [(NSDictionary *)websiteInfo->attributes objectForKey:current];
|
||||
CFStringRef attributeValue = CFXMLCreateStringByUnescapingEntities(kCFAllocatorDefault, (CFStringRef)escapedAttributeValue, NULL);
|
||||
if (attributeValue)
|
||||
{
|
||||
// Do a stringWithString dance rather than just casting so that it's GC safe without using the 10.4+ CFMakeCollectable.
|
||||
[enclosureDictionary setObject:[NSString stringWithString:(NSString *)attributeValue] forKey:current];
|
||||
CFRelease(attributeValue);
|
||||
}
|
||||
}
|
||||
[itemDictionaryMutable setObject: enclosureDictionary forKey: itemName];
|
||||
continue;
|
||||
|
||||
Reference in new issue
Block a user