make sure we have content

This commit is contained in:
Athou
2013-05-31 09:31:59 +02:00
parent d0e37af52b
commit 4e7bcd004d

View File

@@ -124,10 +124,16 @@ public class FeedUtils {
public static boolean isRTL(FeedEntry entry) {
String content = entry.getContent().getContent();
if (StringUtils.isBlank(content)) {
return false;
}
String text = Jsoup.parse(content).text();
if (StringUtils.isBlank(text)) {
return false;
}
Direction direction = BidiUtils.get().estimateDirection(text);
return direction == Direction.RTL;
}