From: SourceForge.net <no...@so...> - 2008-09-05 06:46:48
|
Bugs item #2094508, was opened at 2008-09-05 06:46 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=377768&aid=2094508&group_id=23187 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: Java 1.1 Status: Open Resolution: None Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: HTMLDocumentBuilder and Java 1.6 Initial Comment: HTMLDocumentBuilder fails to parse following (one line) HTML correctly if Java 1.6 is used. Only one of input elements finds its way into the document. It works correctly with Java 1.5. If you add a space between </script> and <input> tags it works also with Java 1.6. String html = "<html><head><title>Test</title></head><form action=\"\"><script language=\"javascript\">alert('test');</script><input type=\"text\"/><input type=\"button\"/></form></html>"; TolerantSaxDocumentBuilder tolerantSaxDocumentBuilder = new TolerantSaxDocumentBuilder(XMLUnit.newTestParser()); HTMLDocumentBuilder htmlDocumentBuilder = new HTMLDocumentBuilder(tolerantSaxDocumentBuilder); Document document = htmlDocumentBuilder.parse(html); ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=377768&aid=2094508&group_id=23187 |