Amarok may save invalid xml playlists

Jeff Mitchell kde-dev at emailgoeshere.com
Sat Oct 20 03:25:03 UTC 2007


On Friday 19 October 2007, Miguel Angel Alvarez wrote:
> Hi all,
> The saved playlist may not be valid xml, containing escaped non-utf8
> characters which in turn will cause parsers to fail.
> See this bugreport for replaygain someone sent me, and have a look at the
> attached playlist in line 1551:
>
> Traceback (most recent call last):
>   File
> "/home/yoda/.kde/share/apps/amarok/scripts/amarok_replaygain/amarok_replayg
>ain.py", line 1095, in <module>
>     PlayList.update()
>   File
> "/home/yoda/.kde/share/apps/amarok/scripts/amarok_replaygain/amarok_replayg
>ain.py", line 877, in update
>     xmlparser.parse(str(amarok_dcop.playlist.saveCurrentPlaylist()[1]))
>   File "/usr/lib/python2.5/site-packages/_xmlplus/sax/expatreader.py", line
> 109, in parse
>     xmlreader.IncrementalParser.parse(self, source)
>   File "/usr/lib/python2.5/site-packages/_xmlplus/sax/xmlreader.py", line
> 123, in parse
>     self.feed(buffer)
>   File "/usr/lib/python2.5/site-packages/_xmlplus/sax/expatreader.py", line
> 220, in feed
>     self._err_handler.fatalError(exc)
>   File "/usr/lib/python2.5/site-packages/_xmlplus/sax/handler.py", line 38,
> in fatalError
>     raise exception
> xml.sax._exceptions.SAXParseException:/home/yoda/.kde/share/apps/amarok/cur
>rent.xml:1551:51: reference to invalid
> character number
>
> This is not actually a problem for me, since the affected parts are not of
> interes for replaygain and I have already written a workaround, but for
> other people this may be a more severe problem.

Miguel--

Here's line 1551:

<Directory>/music/from iTunes/Virginia Jetzt!/Anf&#xdbff;&#xdee4;nger Deluxe 
(Tour Edition)</Directory>

Can you explain what's actually wrong with this?  I don't know what character 
it's supposed to be, or why escaping it is invalid.

I can tell you that the problem, whatever it is, is likely in xmlEncode in 
metabundle.cpp, starting at line 1512.

--Jeff



More information about the Amarok mailing list