libplist fails to convert string nodes with xml entities
Reported by Martin S. | January 6th, 2010 @ 06:44 PM
The binary/xml conversion fails for the example below due to no xml entity conversion:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Some String with Entities</key>
<string>hello world & others</string>
</dict>
</plist>
According to the NSPropertyListSerialization class documentation string nodes in XML format do the following:
"In XML format, the string is simply stored in UTF8 format as the content of a string element, and the only character escapes required are those used by XML such as the '<' markup representing a '<' character."
Fix: Converting the above plist to binary and the result back to xml must be consistent.
Comments and changes to this ticket
-
Martin S. January 9th, 2010 @ 09:52 AM
- State changed from new to open
Attached a patch which fixes this and adds the issue to the test cases.
-
Martin S. January 9th, 2010 @ 10:00 AM
Infact I had another patch which might aswell be applied alongside this. ;)
-
Jonathan Beck January 14th, 2010 @ 05:38 PM
- State changed from open to resolved
Both applied, thanks.
Is this needed in a new release or should I wait a bit further ? -
Martin S. January 21st, 2010 @ 11:50 AM
While it doesn't depend on the next libiphone release it would still be nice to have a minor bugfix release out.
It is handy for some other tools that are being worked on which should not fail once announced/released.
Thanks! :)
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
A project around supporting the iPhone in Linux.
See http://libimobiledevice.org