GNOME Bugzilla – Bug 156783
Rhythmbox could handle wrongly encoded URL gracefully
Last modified: 2006-01-27 12:36:51 UTC
This a request to enhance the parsing of documents holding wrongly encoded URL. You can find a sample of a problematic document at <http://www.omroep.nl/radio3/live64.asx>. The document contains: <ASX version = "3.0"> <Title>Radio 3FM</Title> <ENTRYREF href = "http://switch.streamgate.nl/cgi-bin/streamswitch?streamid=46&a=.asx" /> <ENTRYREF href = "http://www.omroep.nl/radio3/radio3-breed.asx" /> </ASX> Please note the "&a=.asx" in the URL referenced. It is incorrect because it should be encoded as "&a=.asx" I think. It would be nice if the parsing could succeed anyway, right now it outputs: [0x80f0f10] [rb_shell_corba_handle_file] rb-shell.c:865 (09:14:25): handling uri: http://www.omroep.nl/radio3/live64.asx [0x80f0f10] [rb_shell_corba_handle_file] rb-shell.c:875 (09:14:25): parsing uri as playlist: http://www.omroep.nl/radio3/live64.asx [0x80f0f10] [rb_playlist_manager_parse_file] rb-playlist-manager.c:461 (09:14:25): loading playlist from http://www.omroep.nl/radio3/live64.asx Entity: line 3: parser error : EntityRef: expecting ';' <ENTRYREF href = "http://switch.streamgate.nl/cgi-bin/streamswitch?streamid=46&a ^ Entity: line 3: parser error : EntityRef: expecting ';' <ENTRYREF href = "http://switch.streamgate.nl/cgi-bin/streamswitch?streamid=46&a ^ [0x80f0f10] [rb_shell_clipboard_entryview_changed_cb] rb-shell-clipboard.c:556 (09:14:25): entryview changed ...
This is Debian bug <http://bugs.debian.org/278716>.
Parsing a malformed XML document, outputting "something" and making sure "something" is what the user would expect is probably a pretty hard problem :) Maybe we can limit ourselves to handling a few specific cases, for example replacing non escaped & with & before trying to parse the document (or if parsing the document resulted in an error).
Yes I agree some limits should be set, and this is a problem that the Mozilla folks are probably well-aware of. Handling the & as & when no ";" is found could be a first step for compatibility. Issuing a warning in the output would be a good idea too: at least the user should now why something failed ("ill-formed XML" or whatever).
Bug #131306 is similar.
Could you test if this issue is still present in the 0.9.x series, particularly in CVS?
This still occurs with newer versions, however we use totem-plparser to load playlists (and read iradio station playlists). Bug 328720 is about the same problem and it was marked NOTGNOME because the playlist file is broken - so marking this the same.