mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-25 04:50:54 +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"]
|
NSStringEncoding encoding = [[options objectForKey: @"CharacterEncoding"]
|
||||||
intValue];
|
intValue];
|
||||||
NSDictionary *defaultAttrs = [options objectForKey: @"DefaultAttributes"];
|
NSDictionary *defaultAttrs = [options objectForKey: @"DefaultAttributes"];
|
||||||
|
NSString *str = [[NSString alloc] initWithData: data
|
||||||
|
encoding: encoding];
|
||||||
NSAttributedString *attr;
|
NSAttributedString *attr;
|
||||||
|
|
||||||
attr = [[NSAttributedString alloc]
|
attr = [[NSAttributedString alloc]
|
||||||
initWithString: [NSString initWithData: data
|
initWithString: str
|
||||||
encoding: encoding]
|
|
||||||
attributes: defaultAttrs];
|
attributes: defaultAttrs];
|
||||||
|
RELEASE(str);
|
||||||
[self setAttributedString: attr];
|
[self setAttributedString: attr];
|
||||||
RELEASE(attr);
|
RELEASE(attr);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue