diff options
author | Bananeweizen <bananeweizen@gmx.de> | 2012-04-29 11:10:03 +0200 |
---|---|---|
committer | Bananeweizen <bananeweizen@gmx.de> | 2012-04-29 11:10:03 +0200 |
commit | 06fe573f2830f791c9f3e33ddcd9aac873e4c41f (patch) | |
tree | 8b6ef6cc589bc0083aef46ba9b3e3632b4d8697e /tests/src/cgeo | |
parent | 805f3ae52270c58c1e4617f41b68ca813582b8e9 (diff) | |
download | cgeo-06fe573f2830f791c9f3e33ddcd9aac873e4c41f.zip cgeo-06fe573f2830f791c9f3e33ddcd9aac873e4c41f.tar.gz cgeo-06fe573f2830f791c9f3e33ddcd9aac873e4c41f.tar.bz2 |
fix #1450: TB not visible (related to special characters)
Diffstat (limited to 'tests/src/cgeo')
-rw-r--r-- | tests/src/cgeo/geocaching/connector/gc/GCConstantsTest.java | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/src/cgeo/geocaching/connector/gc/GCConstantsTest.java b/tests/src/cgeo/geocaching/connector/gc/GCConstantsTest.java index 809318a..d923c6a 100644 --- a/tests/src/cgeo/geocaching/connector/gc/GCConstantsTest.java +++ b/tests/src/cgeo/geocaching/connector/gc/GCConstantsTest.java @@ -4,6 +4,7 @@ import cgeo.geocaching.test.mock.MockedCache; import cgeo.geocaching.utils.BaseUtils; import android.test.AndroidTestCase; +import android.text.Html; public class GCConstantsTest extends AndroidTestCase { @@ -42,4 +43,9 @@ public class GCConstantsTest extends AndroidTestCase { assertEquals("aKWZ", BaseUtils.getMatch(session, GCConstants.PATTERN_USERSESSION, "")); assertTrue(BaseUtils.getMatch(session, GCConstants.PATTERN_SESSIONTOKEN, "").startsWith("123pNK")); } + + public static void testTBWithSpecialChar() { + String page = "<meta name=\"og:site_name\" content=\"Geocaching.com\" property=\"og:site_name\" /><meta name=\"og:type\" content=\"article\" property=\"og:type\" /><meta name=\"fb:app_id\" content=\"100167303362705\" property=\"fb:app_id\" /><meta name=\"og:url\" content=\"http://coord.info/TB4VPZD\" property=\"og:url\" /><meta name=\"og:description\" property=\"og:description\" /><meta name=\"og:image\" content=\"http://www.geocaching.com/images/facebook/wpttypes/24.png\" property=\"og:image\" /><meta name=\"og:title\" content=\"Schlauchen&ravestorm\" property=\"og:title\" /></head>\n"; + assertEquals("Schlauchen&ravestorm", Html.fromHtml(BaseUtils.getMatch(page, GCConstants.PATTERN_TRACKABLE_NAME, "")).toString()); + } } |