use title if content is empty for rtl detection

This commit is contained in:
Athou
2013-06-02 19:42:11 +02:00
parent e7f1d885eb
commit a3cc4ee269

View File

@@ -127,13 +127,17 @@ public class FeedUtils {
}
public static boolean isRTL(FeedEntry entry) {
String content = entry.getContent().getContent();
String text = entry.getContent().getContent();
if (StringUtils.isBlank(content)) {
if (StringUtils.isBlank(text)) {
text = entry.getContent().getTitle();
}
if (StringUtils.isBlank(text)) {
return false;
}
String text = Jsoup.parse(content).text();
text = Jsoup.parse(text).text();
if (StringUtils.isBlank(text)) {
return false;
}