Skip Menu |

This queue is for tickets about the Mac-PropertyList CPAN distribution.

Report information
The Basics
Id: 68830
Status: open
Priority: 0/
Queue: Mac-PropertyList

People
Owner: Nobody in particular
Requestors: thaljef [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 1.33
Fixed in: (no value)



Subject: XML entites are not round-trip safe
Mac::PropertyList uses XML::Entities to decode the strings it reads, but it does not encode them when writing them back out. So this input: <string>foo &lt; bar</string> Becomes this output: <string>foo < bar</string> Which is invalid XML. At the moment, I've got a patch that uses HTML::Entities to do the encoding/decoding. But I'm not yet sure it is the right approach. -- Jeffrey Thalhammer Imaginative Software Systems www.imaginative-software.com
Do I get to see the patch (and does it work)? Why are you unsure?
You'll get it. Just got to write some test cases first. Also, I'm not sure if HTML::Entities is the way to go, since XML only supports a subset of the named entities. I suppose one solution is to always used numbered character references. http://en.wikipedia.org/wiki/List_of_XML_and_HTML_character_entity_references -- Jeffrey Thalhammer Imaginative Software Systems www.imaginative-software.com
Subject: Re: [rt.cpan.org #68830] XML entites are not round-trip safe
Date: Wed, 15 Jun 2011 22:19:28 +0200
To: bug-Mac-PropertyList [...] rt.cpan.org
From: brian d foy <bdfoy [...] cpan.org>
Show quoted text
>  Also, I'm not > sure if HTML::Entities is the way to go, since XML only supports a > subset of the named entities.
You can tell HTML::Entities's encode_entities which characters to escape, so you can limit it to whatever you like. -- brian d foy <brian.d.foy@gmail.com> http://www.pair.com/~comdog/
I forked the code on github, and the latest version there is 1.32_01. But search.cpan.org shows 1.33 as the latest release and that appears to be when you added the entity decoding. Oddly, search.cpan.org also shows 1.32_01 as the latest developer release, which does not have the entity decoding despite being several months newer than 1.33. So I'm not sure what the "latest" code is supposed to be. Can you set me straight?
Subject: Re: [rt.cpan.org #68830] XML entites are not round-trip safe
Date: Thu, 16 Jun 2011 13:21:47 +0200
To: bug-Mac-PropertyList [...] rt.cpan.org
From: brian d foy <bdfoy [...] cpan.org>
The latest code is now the stuff in github. I don't know why the 1.33 changes weren't in the github repo. They weren't in my local copies either. I merged the 1.33 distro into my repo and push it to github. Some of the files are slightly different in the repo compared to the 1.33 distribution. I also started a 1.33_01 branch, but you can work is some other branch if you like. I'm also tracking your github fork too. Pull requests are fine.