This commit is contained in:
Michael Peter Christen 2013-10-07 12:59:54 +02:00
parent 101a6e6e14
commit ef31d0f279

View File

@ -185,7 +185,7 @@ public class RSSReader extends DefaultHandler {
} }
this.item = new RSSMessage(); this.item = new RSSMessage();
this.parsingItem = true; this.parsingItem = true;
} else if (this.parsingItem && this.type == Type.atom && "link".equals(tag) && (atts.getValue("type") == null || atts.getValue("type").startsWith("text"))) { } else if (this.parsingItem && this.type == Type.atom && "link".equals(tag) && (atts.getValue("type") == null || this.item.getLink().length() == 0 || atts.getValue("type").startsWith("text") || atts.getValue("type").equals("application/xhtml+xml"))) {
final String url = atts.getValue("href"); final String url = atts.getValue("href");
if (url != null && url.length() > 0) this.item.setValue(Token.link, url); if (url != null && url.length() > 0) this.item.setValue(Token.link, url);
} else if ("image".equals(tag) || (this.parsingItem && this.type == Type.atom && "link".equals(tag) && (atts.getValue("type") == null || atts.getValue("type").startsWith("image")))) { } else if ("image".equals(tag) || (this.parsingItem && this.type == Type.atom && "link".equals(tag) && (atts.getValue("type") == null || atts.getValue("type").startsWith("image")))) {