diff options
Diffstat (limited to 'main/src/cgeo/geocaching/utils/HtmlUtils.java')
| -rw-r--r-- | main/src/cgeo/geocaching/utils/HtmlUtils.java | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/main/src/cgeo/geocaching/utils/HtmlUtils.java b/main/src/cgeo/geocaching/utils/HtmlUtils.java index 8d4eed1..5717a37 100644 --- a/main/src/cgeo/geocaching/utils/HtmlUtils.java +++ b/main/src/cgeo/geocaching/utils/HtmlUtils.java @@ -10,7 +10,11 @@ import java.util.ArrayList; import java.util.Collections; import java.util.Comparator; -public class HtmlUtils { +public final class HtmlUtils { + + private HtmlUtils() { + // utility class + } /** * Extract the text from a HTML based string. This is similar to what HTML.fromHtml(...) does, but this method also @@ -20,6 +24,9 @@ public class HtmlUtils { * @return */ public static String extractText(CharSequence html) { + if (StringUtils.isBlank(html)) { + return StringUtils.EMPTY; + } String result = html.toString(); // recognize images in textview HTML contents |
