[readFromURL:options:documentAttributes:] corrected the handling

to type "text", where [NSString alloc] was missing.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@17595 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Fred Kiefer 2003-09-01 18:14:47 +00:00
parent 1e93141946
commit 4035581bdd

View file

@ -1128,12 +1128,14 @@ documentAttributes: (NSDictionary **)dict
NSStringEncoding encoding = [[options objectForKey: @"CharacterEncoding"]
intValue];
NSDictionary *defaultAttrs = [options objectForKey: @"DefaultAttributes"];
NSString *str = [[NSString alloc] initWithData: data
encoding: encoding];
NSAttributedString *attr;
attr = [[NSAttributedString alloc]
initWithString: [NSString initWithData: data
encoding: encoding]
attr = [[NSAttributedString alloc]
initWithString: str
attributes: defaultAttrs];
RELEASE(str);
[self setAttributedString: attr];
RELEASE(attr);