handle invalid feeds having unescaped html entities

This commit is contained in:
Athou
2014-03-01 18:19:49 +01:00
parent e727ee414b
commit f4f3d9ca48
3 changed files with 275 additions and 0 deletions

View File

@@ -55,6 +55,7 @@ public class FeedParser {
if (xmlString == null) {
throw new FeedException("Input string is null for url " + feedUrl);
}
xmlString = FeedUtils.replaceHtmlEntitiesWithNumericEntities(xmlString);
InputSource source = new InputSource(new StringReader(xmlString));
SyndFeed rss = new SyndFeedInput().build(source);
handleForeignMarkup(rss);