mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-25 00:21:36 +00:00
[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:
parent
1e93141946
commit
4035581bdd
1 changed files with 5 additions and 3 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue