better duplicate image detection for image enclosures
This commit is contained in:
parent
77bd9f3923
commit
1758f5a495
@ -239,7 +239,9 @@ public class ArticleFragment extends Fragment {
|
|||||||
URL url = new URL(a.content_url.trim());
|
URL url = new URL(a.content_url.trim());
|
||||||
String strUrl = url.toString().trim();
|
String strUrl = url.toString().trim();
|
||||||
|
|
||||||
if (a.content_type.indexOf("image") != -1 /* && !articleContent.contains(strUrl) */) {
|
String regex = String.format("<img.*?src=[\"']%1$[\"']", strUrl);
|
||||||
|
|
||||||
|
if (a.content_type.indexOf("image") != -1 && !articleContent.matches(regex)) {
|
||||||
content += "<p><img src=\"" + strUrl.replace("\"", "\\\"") + "\"></p>";
|
content += "<p><img src=\"" + strUrl.replace("\"", "\\\"") + "\"></p>";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user