Bug 157674 - Whitespace removed from <pre> tags in Atom posts
Summary: Whitespace removed from <pre> tags in Atom posts
Status: RESOLVED FIXED
Alias: None
Product: akregator
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-02-11 19:06 UTC by Tap
Modified: 2008-02-12 20:47 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
Patch to avoid simplifying whitespace on Atom posts with pre tags (1.21 KB, patch)
2008-02-11 19:07 UTC, Tap
Details
Snapshot of Planet Perl feed (271.87 KB, application/atom+xml)
2008-02-11 19:13 UTC, Tap
Details

Note You need to log in before you can comment on or make changes to this bug.
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