xscreensaver-text returns duplicate lines in rss feeds

Bug #526997 reported by Torben Nielsen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
xscreensaver (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Binary package hint: xscreensaver

In some cases RSS feeds will include the entire content in the title field as well. In this case xscreensaver-text will return what appears to be duplicate text.

As a user I expect this to be filtered in the RSS parsing of xscreensaver-text.

lsb_release -rd:
Description: Ubuntu 9.10
Release: 9.10

apt-cache policy xscreensaver
xscreensaver:
  Installed: (none)
  Candidate: 5.08-0ubuntu5
  Version table:
     5.08-0ubuntu5 0
        500 http://dk.archive.ubuntu.com karmic/main Packages

Revision history for this message
Torben Nielsen (tkn-torbennielsen) wrote :

This can be fixed by adding the following line to /usr/bin/xscreensaver-text

$body1 = '' if (rindex $title,$body1); # Some feeds include the body in the title

in the reformat_rss($) function right before "reformat_html ("$title<P>$body1", 1);" This is about line 174 in my file.

Revision history for this message
Tormod Volden (tormodvolden) wrote :

Thanks for your bug report and patch. This is a change suitable for upstream inclusion, so please send your patch directly to the xscreensaver author (jwz) as well.

However, there is already a similar line in the code:
 $title = '' if ($body1 eq $title);
So should this line rather be replaced or modified to cover both cases?

Changed in xscreensaver (Ubuntu):
status: New → Confirmed
Revision history for this message
Torben Nielsen (tkn-torbennielsen) wrote :

I think the behavior should be

if(title contains body)
   print only title
else
  print both

Also, my fix is incorrect. It should read

$body1 = '' if (rindex ($title,$body1) >= 0);

and this can be used as a replacement for existing line.

This however doesn't solve the problem in all cases. Specifically, when the title contains the body, but this is not immediately evident because of differing HTML tags (see attached example). I'm not experienced enough to create a patch for this, but I'm certain that it's possible.

The argument for considering the body to be contained in the title in this case, is that this is in fact the case in the output from xscreensaver-text where HTML is parsed or stripped accordingly.

Revision history for this message
Torben Nielsen (tkn-torbennielsen) wrote :

I have informed jwz of this bug according to the procedure at http://www.jwz.org/xscreensaver/bugs.html

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.