Skip to content

Conversation

@equeim
Copy link
Contributor

@equeim equeim commented Dec 7, 2024

Check whether body actually has any HTML markup, and if not then treat item's text as plain text and convert it to HTML by turning newline characters and empty lines in <br>/<p> tags (using HtmlCompat.toHtml() method).

Here is an example of feed that's currently displayed incorrectly: https://lists.opensuse.org/archives/list/factory@lists.opensuse.org/feed/

This is needed to preserve whitespace in RSS/ATOM item descriptions.
Also fix flipped expected/actual arguments.
@Shinokuni
Copy link
Member

Hello, thank you for this contribution! I've added a comment about HtmlCompat.toHtml but otherwise LGTM.

Knowing if item content is plain text might add a bit of overhead for large text, but it should be ok.

@Shinokuni Shinokuni merged commit 144cd9f into readrops:develop Dec 13, 2024
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants