Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

libplist fails to convert string nodes with xml entities

#105

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 &amp; 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.

Reported by Martin S. · January 6th, 2010 @ 06:44 PM

State: resolved
Milestone: none
Assigned to: Jonathan Beck Jonathan Beck

Activity

  1. Martin S.
    Martin S.
    • State changed from new to open

    Attached a patch which fixes this and adds the issue to the test cases.

    January 9th, 2010 @ 09:52 AM

  2. Martin S.
  3. Jonathan Beck
    Jonathan Beck
    • State changed from open to resolved

    Both applied, thanks.
    Is this needed in a new release or should I wait a bit further ?

    January 14th, 2010 @ 05:38 PM

  4. Martin S.
    Martin S.

    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! :)

    January 21st, 2010 @ 11:50 AM

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.