forked from upstream-mirrors/OpenTracks
Fix encoding bug when a spreadsheet title contains special
characters like ().
This commit is contained in:
@@ -38,8 +38,6 @@ import android.content.Context;
|
|||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.UnsupportedEncodingException;
|
|
||||||
import java.net.URLEncoder;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* AsyncTask to send a track to Google Docs.
|
* AsyncTask to send a track to Google Docs.
|
||||||
@@ -129,13 +127,6 @@ public class SendDocsAsyncTask extends AbstractSendAsyncTask {
|
|||||||
if (track.getCategory() != null && !track.getCategory().equals("")) {
|
if (track.getCategory() != null && !track.getCategory().equals("")) {
|
||||||
title += "-" + track.getCategory();
|
title += "-" + track.getCategory();
|
||||||
}
|
}
|
||||||
try {
|
|
||||||
title = URLEncoder.encode(title, "UTF-8");
|
|
||||||
title = title.replace('+', ' ');
|
|
||||||
} catch (UnsupportedEncodingException e) {
|
|
||||||
Log.d(TAG, "No UTF-8 encoding", e);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Get the spreadsheet ID
|
// Get the spreadsheet ID
|
||||||
publishProgress(PROGRESS_GET_SPREADSHEET_ID);
|
publishProgress(PROGRESS_GET_SPREADSHEET_ID);
|
||||||
|
|||||||
Reference in New Issue
Block a user