Skip to content
This repository has been archived by the owner on Sep 16, 2022. It is now read-only.

-[GDataXMLNode setStringValue:] doesn't perform escaping of special characters. #142

Closed
GoogleCodeExporter opened this issue Apr 21, 2015 · 0 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1.
Execute the following code:
    GDataXMLElement *test = [GDataXMLNode elementWithName:@"test"];
    [test setStringValue:@"test & test"];
    NSLog(@"XMLString = %@", [test XMLString]); 

What is the expected output? What do you see instead?

Expected output:
XMLString = <test>test &amp; amp</test>

Actual output:
error : unterminated entity reference            test
XMLString = <test>test </test>

Additional information:
After changing line 407 of GDataXMLNode.m to

xmlNodeSetContent(xmlNode_, xmlEncodeSpecialChars(NULL, 
GDataGetXMLString(str)));

the above example works as expected.

Original issue reported on code.google.com by rinas.al...@gmail.com on 31 May 2012 at 1:46

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants