diff --git a/src/com/android/email/Snippet.java b/src/com/android/email/Snippet.java index 4604bb3a3..cb25f47aa 100644 --- a/src/com/android/email/Snippet.java +++ b/src/com/android/email/Snippet.java @@ -45,8 +45,6 @@ public class Snippet { static final String[] STRIP_TAGS = new String[] {"title ", "script", "style ", "applet"}; static final int STRIP_TAG_LENGTH = 6; - // Note: ESCAPE_STRINGS is taken from the StringUtil class which is part of the - // unbundled_google package static final Map ESCAPE_STRINGS; static { // HTML character entity references as defined in HTML 4 @@ -372,9 +370,10 @@ public class Snippet { // Strip content of title, script, style and applet tags if (i < (length - (STRIP_TAG_LENGTH + 2))) { String tag = text.substring(i + 1, i + STRIP_TAG_LENGTH + 1); + String tagLowerCase = tag.toLowerCase(); boolean stripContent = false; for (String stripTag: STRIP_TAGS) { - if (stripTag.equals(tag)) { + if (stripTag.equals(tagLowerCase)) { stripContent = true; break; } diff --git a/tests/src/com/android/email/SnippetTests.java b/tests/src/com/android/email/SnippetTests.java index 0708ac11d..3d3a018f6 100644 --- a/tests/src/com/android/email/SnippetTests.java +++ b/tests/src/com/android/email/SnippetTests.java @@ -118,6 +118,8 @@ public class SnippetTests extends AndroidTestCase { public void testStripContent() { assertEquals("Visible", Snippet.fromHtmlText( "Visible")); + assertEquals("Visible", Snippet.fromHtmlText( + "Visible")); assertEquals("IsVisible", Snippet.fromHtmlText( "IsVisible")); assertEquals("Visible", Snippet.fromHtmlText(