-
Notifications
You must be signed in to change notification settings - Fork 200
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AEXMLElement writes attributes unescaped #61
Comments
I see this problem too |
Can you elaborate on this? Which version are you using? I'm only interested if it's the latest, and if you could please add some example in Xcode Playground perhaps? |
It happens in the latest version. In particular, in the xmlString property, you use (escapedStringValue) for the element value, and the unescaped (value) for the attributes values.
Attributes are [String: String], so they can't access the escapedStringValue property of AEXMLElement. |
…public String extension Implemented using of `xmlEscaped` for attribute values inside `xmlString` [fixed Issue #61] Improved `testXMLString` and added `testXMLEscapedString` in unit tests
* develop: Bumped version from 2.1.0 to 3.0.0 Update CHANGELOG.md Update README.md Minor refactoring and inline docs improvements Added support for Swift Package Manager (PR#70) Created separate Xcode project for example (AEXMLDemo) Moved example stuff from library project to new example project Organizing project schemes, directories, files and stuff Renamed directory 'Source' -> 'Sources' Improved error handling (fixed Issue #62) Added error property of ErrorType enum with possible error cases Removed errorElementName static property Modified subscript logic of AEXMLElement to return empty element with ElementNotFound error (if element does not exist) Modified root property of AEXMLDocument to return empty element with RootElementMissing error (if root element does not exist) Improved logic in testRootElement and testNotExistingElement unit tests Minor changes in example ViewController and README.md Replaced `escapedStringValue` property with `xmlEscaped` property in public String extension Implemented using of `xmlEscaped` for attribute values inside `xmlString` [fixed Issue #61] Improved `testXMLString` and added `testXMLEscapedString` in unit tests Added xmlStringCompact property to AEXMLElement (again) It was removed earlier in 0d2e7f1 but added again because of the PR#71 Minor refactoring Change NSXMLParserOptions struct Minor refactoring (fix for #73 is already there) Remove 'var" from parameters of indentation function Removed inheritance from NSObject in AEXMLElement Fixed issue #57 and PR #63
Hi, escaping attribute values is added in latest version (3.0.0). Thanks for reporting this! |
I am using an old version, but I think this is still in the source - if you set an attribute value to a string with an & in it, it is written unescaped by .xmlString
The text was updated successfully, but these errors were encountered: