Bug 436288 - Wrong indentation in pre-formatted html content (5.78 regression)
Summary: Wrong indentation in pre-formatted html content (5.78 regression)
Status: REPORTED
Alias: None
Product: frameworks-syndication
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 5.80.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-04-28 01:20 UTC by Alexander Miller
Modified: 2021-05-01 16:55 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Miller 2021-04-28 01:20:23 UTC
Since commit 9a54df8b ("Port away from deprecated QXmlInputSource"), syndication changes the indentation of lines that start with a tag in the html content of a feed item. That doesn't matter in most places, but it's a problem where whitespace should be preserved, like in a <pre> block or a tag with style="white-space:pre".

As a result, after upgrading from frameworks 5.77 to 5.80, newly fetched articles of a feed that regularly uses pre-formatted content with additional markup are shown with wrongly indented lines in akregator, while old, archived articles still render correctly. Reverting the commit mentioned above fixes the problem.

A small made-up example to illustrate the problem:
If an article contains
<pre>
line 1
<b>line</b> 2
line 3
</pre>
then several spaces will be added in front of line 2, which is wrong.

The offending commit should be reverted and then the deprecated method may be replaced with a different solution that doesn't cause regressions.
Comment 1 Christophe Marin 2021-04-29 10:44:36 UTC
David, the commit mentioned here is one you pushed.
Comment 2 Ahmad Samir 2021-05-01 16:55:35 UTC
A link to an affected feed would be nice to test with here :)