Fix line breaks in plain-text descriptions

Workaround was added for publishers misbehaving but the current
implementation breaks valid feeds
This commit is contained in:
ByteHamster 2022-01-30 14:47:02 +01:00
parent 95390fd467
commit 6196cd754f
1 changed files with 1 additions and 1 deletions

View File

@ -136,7 +136,7 @@ public class Rss20 extends Namespace {
if (CHANNEL.equals(second) && state.getFeed() != null) {
state.getFeed().setDescription(contentFromHtml);
} else if (ITEM.equals(second) && state.getCurrentItem() != null) {
state.getCurrentItem().setDescriptionIfLonger(contentFromHtml);
state.getCurrentItem().setDescriptionIfLonger(content); // fromHtml here breaks \n when not html
}
} else if (LANGUAGE.equals(localName) && state.getFeed() != null) {
state.getFeed().setLanguage(content.toLowerCase(Locale.US));