diff --git a/src/main/java/org/jsoup/nodes/FormElement.java b/src/main/java/org/jsoup/nodes/FormElement.java index e3404af50b..33b75e798e 100644 --- a/src/main/java/org/jsoup/nodes/FormElement.java +++ b/src/main/java/org/jsoup/nodes/FormElement.java @@ -91,7 +91,7 @@ public List formData() { if (name.length() == 0) continue; String type = el.attr("type"); - if (type.equalsIgnoreCase("button")) continue; // browsers don't submit these + if (type.equalsIgnoreCase("button") || type.equalsIgnoreCase("image")) continue; // browsers don't submit these if ("select".equals(el.normalName())) { Elements options = el.select("option[selected]"); diff --git a/src/test/java/org/jsoup/nodes/FormElementTest.java b/src/test/java/org/jsoup/nodes/FormElementTest.java index ee7702ee21..2cd0a339f2 100644 --- a/src/test/java/org/jsoup/nodes/FormElementTest.java +++ b/src/test/java/org/jsoup/nodes/FormElementTest.java @@ -43,6 +43,7 @@ public static void setUp() { "" + "" + "" + + "" + ""; Document doc = Jsoup.parse(html); FormElement form = (FormElement) doc.select("form").first();