mirror of
https://github.com/Athou/commafeed.git
synced 2026-03-21 21:37:29 +00:00
handle invalid feeds having unescaped html entities
This commit is contained in:
@@ -129,6 +129,14 @@ public class FeedUtils {
|
||||
}
|
||||
return encoding;
|
||||
}
|
||||
|
||||
public static String replaceHtmlEntitiesWithNumericEntities(String source){
|
||||
String result = source;
|
||||
for(String entity : HtmlEntities.NUMERIC_MAPPING.keySet()){
|
||||
result = result.replace(entity, HtmlEntities.NUMERIC_MAPPING.get(entity));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Normalize the url. The resulting url is not meant to be fetched but rather used as a mean to identify a feed and avoid duplicates
|
||||
|
||||
Reference in New Issue
Block a user