diff --git a/app/src/main/java/com/readrops/app/database/entities/Feed.java b/app/src/main/java/com/readrops/app/database/entities/Feed.java index 4a9f6523..1fef438a 100644 --- a/app/src/main/java/com/readrops/app/database/entities/Feed.java +++ b/app/src/main/java/com/readrops/app/database/entities/Feed.java @@ -12,6 +12,8 @@ import com.readrops.readropslibrary.localfeed.json.JSONFeed; import com.readrops.readropslibrary.localfeed.rss.RSSChannel; import com.readrops.readropslibrary.localfeed.rss.RSSFeed; +import org.jsoup.Jsoup; + import static android.arch.persistence.room.ForeignKey.NO_ACTION; @Entity(foreignKeys = @ForeignKey(entity = Folder.class, parentColumns = "id", childColumns = "folder_id", onDelete = ForeignKey.SET_NULL)) @@ -185,7 +187,7 @@ public class Feed implements Parcelable { Feed feed = new Feed(); RSSChannel channel = rssFeed.getChannel(); - feed.setName(channel.getTitle()); + feed.setName(Jsoup.parse(channel.getTitle()).text()); feed.setUrl(channel.getFeedUrl()); feed.setSiteUrl(channel.getUrl()); feed.setDescription(channel.getDescription()); diff --git a/app/src/main/java/com/readrops/app/database/entities/Item.java b/app/src/main/java/com/readrops/app/database/entities/Item.java index 56de02de..fc0427a0 100644 --- a/app/src/main/java/com/readrops/app/database/entities/Item.java +++ b/app/src/main/java/com/readrops/app/database/entities/Item.java @@ -11,6 +11,7 @@ import com.readrops.readropslibrary.localfeed.rss.RSSItem; import com.readrops.readropslibrary.localfeed.rss.RSSMediaContent; import org.joda.time.LocalDateTime; +import org.jsoup.Jsoup; import java.text.ParseException; import java.util.ArrayList; @@ -172,7 +173,7 @@ public class Item { newItem.setContent(item.getContent()); newItem.setDescription(item.getDescription()); newItem.setGuid(item.getGuid()); - newItem.setTitle(item.getTitle()); + newItem.setTitle(Jsoup.parse(item.getTitle()).text()); // I wish I hadn't done that... if (Pattern.compile(DateUtils.RSS_ALTERNATIVE_DATE_FORMAT_REGEX).matcher(item.getDate()).matches())