mirror of
https://github.com/AntennaPod/AntennaPod.git
synced 2025-12-01 12:31:45 +00:00
Improved feedparser performance
This commit is contained in:
@ -4,6 +4,8 @@ import java.io.UnsupportedEncodingException;
|
||||
import java.net.URLEncoder;
|
||||
import java.text.DateFormat;
|
||||
|
||||
import org.apache.commons.lang3.StringEscapeUtils;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.os.Bundle;
|
||||
import android.text.format.DateUtils;
|
||||
@ -91,7 +93,7 @@ public class ItemviewActivity extends SherlockActivity {
|
||||
url = URLEncoder.encode(item.getDescription(), "utf-8")
|
||||
.replaceAll("\\+", " ");
|
||||
} else {
|
||||
url = URLEncoder.encode(item.getContentEncoded(), "utf-8")
|
||||
url = URLEncoder.encode(StringEscapeUtils.unescapeHtml4(item.getContentEncoded()), "utf-8")
|
||||
.replaceAll("\\+", " ");
|
||||
}
|
||||
|
||||
|
||||
@ -35,6 +35,7 @@ import android.graphics.BitmapFactory;
|
||||
import android.support.v4.app.NotificationCompat;
|
||||
import android.util.Log;
|
||||
import android.os.Binder;
|
||||
import android.os.Debug;
|
||||
import android.os.Handler;
|
||||
import android.os.Message;
|
||||
import android.os.Messenger;
|
||||
@ -270,7 +271,6 @@ public class DownloadService extends Service {
|
||||
public void run() {
|
||||
long imageId = 0;
|
||||
boolean hasImage = false;
|
||||
|
||||
FeedManager manager = FeedManager.getInstance();
|
||||
FeedHandler handler = new FeedHandler();
|
||||
feed.setDownloaded(true);
|
||||
|
||||
@ -29,7 +29,7 @@ public class NSContent extends Namespace {
|
||||
@Override
|
||||
public void handleElementEnd(String localName, HandlerState state) {
|
||||
if (localName.equals(ENCODED)) {
|
||||
state.getCurrentItem().setContentEncoded(StringEscapeUtils.unescapeHtml4(state.getContentBuf().toString()));
|
||||
state.getCurrentItem().setContentEncoded(state.getContentBuf().toString());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user