fix attachment duplicate checking, bump version

This commit is contained in:
Andrew Dolgov 2012-10-10 14:15:53 +04:00
parent 171461be53
commit f27bbf9e8c
2 changed files with 8 additions and 8 deletions

View File

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.fox.ttrss"
android:versionCode="110"
android:versionName="0.8.9" >
android:versionCode="111"
android:versionName="0.8.10" >
<uses-sdk
android:minSdkVersion="8"

View File

@ -2,6 +2,7 @@ package org.fox.ttrss;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLEncoder;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
@ -268,20 +269,19 @@ public class ArticleFragment extends Fragment {
URL url = new URL(a.content_url.trim());
String strUrl = url.toString().trim();
String regex = String.format("<img.*?src=[\"']%1$[\"']", strUrl);
String regex = String.format(".*?<img.*src=[\"']%1$s[\"'].*", strUrl);
if (a.content_type.indexOf("image") != -1 && !articleContent.matches(regex)) {
if (a.content_type.indexOf("image") != -1 && !articleContent.replaceAll("[\r\n]", "").matches(regex)) {
content += "<p><img src=\"" + strUrl.replace("\"", "\\\"") + "\"></p>";
}
spinnerArray.add(a);
} catch (MalformedURLException e) {
//
} catch (Exception e) {
e.printStackTrace();
}
spinnerArray.add(a);
}
}