aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorBananeweizen <bananeweizen@gmx.de>2013-09-14 17:46:21 +0200
committerBananeweizen <bananeweizen@gmx.de>2013-09-14 17:46:21 +0200
commitff7d0a1feb9f1507e90a64b66878507cd6d0e0f0 (patch)
tree0a813b8242cb2e4f28bbdf310dab1be66bd835b8 /main
parentfa4234853e9f3afb641fb7a0e1fb7b15ef266262 (diff)
downloadcgeo-ff7d0a1feb9f1507e90a64b66878507cd6d0e0f0.zip
cgeo-ff7d0a1feb9f1507e90a64b66878507cd6d0e0f0.tar.gz
cgeo-ff7d0a1feb9f1507e90a64b66878507cd6d0e0f0.tar.bz2
fix #3250: Strip HTML before using translate
Diffstat (limited to 'main')
-rw-r--r--main/src/cgeo/geocaching/utils/HtmlUtils.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/main/src/cgeo/geocaching/utils/HtmlUtils.java b/main/src/cgeo/geocaching/utils/HtmlUtils.java
index 5717a37..37e20ec 100644
--- a/main/src/cgeo/geocaching/utils/HtmlUtils.java
+++ b/main/src/cgeo/geocaching/utils/HtmlUtils.java
@@ -3,6 +3,7 @@ package cgeo.geocaching.utils;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.tuple.Pair;
+import android.text.Html;
import android.text.Spanned;
import android.text.style.ImageSpan;
@@ -56,7 +57,7 @@ public final class HtmlUtils {
}
}
- // some line breaks are still in the text, source is unknown
- return StringUtils.replace(result, "<br />", "\n").trim();
+ // now that images are gone, do a normal html to text conversion
+ return Html.fromHtml(result).toString().trim();
}
}