aboutsummaryrefslogtreecommitdiffstats
path: root/main/src/cgeo
diff options
context:
space:
mode:
authorSamuel Tardieu <sam@rfc1149.net>2012-08-13 14:28:47 -0700
committerSamuel Tardieu <sam@rfc1149.net>2012-08-13 14:28:47 -0700
commitff507a18d017a6ae27bea2c5faf76fa3832162ee (patch)
tree1ca08ffe29a183f6a996fbd412f83f1c648f58a3 /main/src/cgeo
parent1825b569318b908f1f2e9fbec6b66c2a2b9e8850 (diff)
parent71795a0d57ad810fe8f36d0255d3d8b3fdcd7062 (diff)
downloadcgeo-ff507a18d017a6ae27bea2c5faf76fa3832162ee.zip
cgeo-ff507a18d017a6ae27bea2c5faf76fa3832162ee.tar.gz
cgeo-ff507a18d017a6ae27bea2c5faf76fa3832162ee.tar.bz2
Merge pull request #1954 from Buuhuu/master
Fixed Issue #1915
Diffstat (limited to 'main/src/cgeo')
-rw-r--r--main/src/cgeo/geocaching/utils/TranslationUtils.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/main/src/cgeo/geocaching/utils/TranslationUtils.java b/main/src/cgeo/geocaching/utils/TranslationUtils.java
index e086ab6..0066d8e 100644
--- a/main/src/cgeo/geocaching/utils/TranslationUtils.java
+++ b/main/src/cgeo/geocaching/utils/TranslationUtils.java
@@ -4,6 +4,7 @@ import cgeo.geocaching.activity.AbstractActivity;
import android.content.Intent;
import android.net.Uri;
+import android.text.Html;
import java.net.URLEncoder;
@@ -15,7 +16,7 @@ public final class TranslationUtils {
private static final String translationWebsite = "http://translate.google.com/";
private static final String translationForceClassicMode = "?vi=c";
private static final String translationAutoSelect = "#auto";
- private static final String translationFieldSeparator = "|";
+ private static final String translationFieldSeparator = "/";
public static final int translationTextLengthToWarn = 500;
@@ -29,7 +30,7 @@ public final class TranslationUtils {
* @return URI ready to be parsed
*/
public static String buildTranslationURI(final String toLang, final String text) {
- return translationWebsite + translationForceClassicMode + translationAutoSelect + translationFieldSeparator + toLang + translationFieldSeparator + URLEncoder.encode(text).replace("+", "%20");
+ return translationWebsite + translationForceClassicMode + translationAutoSelect + translationFieldSeparator + toLang + translationFieldSeparator + URLEncoder.encode(Html.fromHtml(text).toString());
}
/**