Menu

#198 xml entities not properly quoted

open
nobody
None
5
2013-05-18
2013-05-18
No

When the title contains xml-entities the ampersand (&) must be quoted again, since the response is wrapped in another xml structure.
minidlna doesn't do this properly and crashes my Samsung TV:

Here is the excerpt from the reply:

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><s:Body><u:BrowseResponse xmlns:u="urn:schemas-upnp-org:service:ContentDirectory:1"><Result>&lt;DIDL-Lite xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:upnp="urn:schemas-upnp-org:metadata-1-0/upnp/" xmlns="urn:schemas-upnp-org:metadata-1-0/DIDL-Lite/" xmlns:dlna="urn:schemas-dlna-org:metadata-1-0/"&gt;
&lt;item id="2$15$2$12$2$0" parentID="2$15$2$12$2" restricted="1" refID="64$2$12$2$0"&gt;&lt;dc:title&gt;6. Dungeons &amp; Dragons&lt;/dc:title&gt;...</Result>...

The ampersand must be quoted twice in this case, so minidlna should send "Dungeons &amp;amp; Dragons".

I guess the same holds for other fields.

A workaround is to add the double &amp;amp; to the "nfo" file.

Discussion


Log in to post a comment.