keep text only before detecting direction, use jsoup because bidiutils html stripping is too restrictive

This commit is contained in:
Athou
2013-05-31 09:28:51 +02:00
parent 11b1afb1d1
commit d0e37af52b

View File

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