Bug 157674

Summary: Whitespace removed from <pre> tags in Atom posts
Product: [Applications] akregator Reporter: Tap
Component: generalAssignee: kdepim bugs <kdepim-bugs>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: Patch to avoid simplifying whitespace on Atom posts with pre tags
Snapshot of Planet Perl feed

Description Tap 2008-02-11 19:06:27 UTC
Version:            (using KDE 3.5.8)
Installed from:    Compiled From Sources
OS:                Linux

Akregator (from kdepim 3.5.8) already has a hack in akregator/src/librss/tools_p.cpp to avoid compressing whitespace in posts containing HTML <pre> tags, but it fails to apply this check to Atom posts.

This check also fails for cases where the pre tag is specified with an HTML class name or other attributes, so I added a case for that to both checks in my patch.
Comment 1 Tap 2008-02-11 19:07:14 UTC
Created attachment 23536 [details]
Patch to avoid simplifying whitespace on Atom posts with pre tags
Comment 2 Tap 2008-02-11 19:13:37 UTC
Created attachment 23537 [details]
Snapshot of Planet Perl feed

This is a snapshot of the Planet Perl feed. Look at the post "RSpec vs.
Test::More" for a post that exhibits the problem with very long lines because
Akregator removed the newlines within the pre tags.

(Note that this is an Atom feed redirected to by
http://planet.perl.org/rss20.xml -- an odd URL for an Atom feed.)
Comment 3 Frank Osterfeld 2008-02-12 20:47:18 UTC
SVN commit 774227 by osterfeld:

improve <pre> tag detection and preserve whitespace if found (now also for atom)
Patch by "tap", tap at people.homeip.net
BUG:157674


 M  +5 -2      tools_p.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=774227