After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 156783 - Rhythmbox could handle wrongly encoded URL gracefully
Rhythmbox could handle wrongly encoded URL gracefully
Status: RESOLVED NOTGNOME
Product: rhythmbox
Classification: Other
Component: Internet Radio
0.8.8
Other Linux
: Low enhancement
: ---
Assigned To: RhythmBox Maintainers
RhythmBox Maintainers
Depends on:
Blocks:
 
 
Reported: 2004-10-29 07:35 UTC by Loïc Minier
Modified: 2006-01-27 12:36 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Loïc Minier 2004-10-29 07:35:26 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 "&amp;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
...
Comment 1 Loïc Minier 2004-10-29 07:41:47 UTC
This is Debian bug <http://bugs.debian.org/278716>.
Comment 2 Christophe Fergeau 2004-11-01 11:43:55 UTC
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 &amp; before trying to parse the document (or if
parsing the document resulted in an error).
Comment 3 Loïc Minier 2004-11-01 12:01:00 UTC
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 &amp; 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).
Comment 4 Christophe Fergeau 2004-11-01 17:39:02 UTC
Bug #131306 is similar.
Comment 5 Alex Lancaster 2006-01-27 11:55:22 UTC
Could you test if this issue is still present in the 0.9.x series, particularly in CVS?
Comment 6 James "Doc" Livingston 2006-01-27 12:36:51 UTC
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.