diff options
Diffstat (limited to 'main/src/cgeo/geocaching/utils/HtmlUtils.java')
| -rw-r--r-- | main/src/cgeo/geocaching/utils/HtmlUtils.java | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/main/src/cgeo/geocaching/utils/HtmlUtils.java b/main/src/cgeo/geocaching/utils/HtmlUtils.java index e90b70d..ab6e8fe 100644 --- a/main/src/cgeo/geocaching/utils/HtmlUtils.java +++ b/main/src/cgeo/geocaching/utils/HtmlUtils.java @@ -21,8 +21,6 @@ public final class HtmlUtils { * Extract the text from a HTML based string. This is similar to what HTML.fromHtml(...) does, but this method also * removes the embedded images instead of replacing them by a small rectangular representation character. * - * @param html - * @return */ public static String extractText(final CharSequence html) { if (StringUtils.isBlank(html)) { @@ -61,7 +59,8 @@ public final class HtmlUtils { return Html.fromHtml(result).toString().trim(); } - public static String removeExtraParagraph(final String html) { + public static String removeExtraParagraph(final String htmlIn) { + final String html = StringUtils.trim(htmlIn); if (StringUtils.startsWith(html, "<p>") && StringUtils.endsWith(html, "</p>")) { final String paragraph = StringUtils.substring(html, "<p>".length(), html.length() - "</p>".length()).trim(); if (extractText(paragraph).equals(paragraph)) { |
