Invalid XML Entities included in metadata file
dinkypumpkin
dinkypumpkin at gmail.com
Sun Mar 24 21:11:17 EDT 2013
On 24/03/2013 20:41, dinkypumpkin wrote:
> On 22/03/2013 20:16, Dave Lambley wrote:
>> On 22/03/13 18:36, Roger Bell_West wrote:
>>> On Fri, Mar 22, 2013 at 06:17:23PM +0000, Ian W Taylor wrote:
>>>> I think the problem is that get_iplayer uses HTML encode_entities()
>>>> and there are about 250 entities defined in HTML but only 5 in the
>>>> XML specification. I've read that XML just defines " &
>>>> ' < and > for the "&'<> characters. However the generic
>>>> metadata XML file includes things like £ for the British? Pound
>>>> sign in the description nodes.
>>>
>>> I've had this problem too, and would like not to have to sanitise the
>>> XML before reading it.
>>
>> Try the attached patch, which switches to numeric entity encoding for
>> XML.
>
> A definite case of over-encoding. I've committed a fix for this issue
> to the Git repo:
I missed something with freevo metadata files (if anyone uses them), so
I made more changes to XML entity encoding. If you pulled get_iplayer
after my earlier post, please pull it again.
More information about the get_iplayer
mailing list