Skip to content

Commit d9a3b39

Browse files
committed
Configure DefaultUserAgent to not ignore comments in HTML documents.
(cherry picked from commit f556555)
1 parent 25bcc35 commit d9a3b39

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/io/sf/carte/doc/agent/net/DefaultUserAgent.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ public DOMDocument readURL(URL url) throws IOException, io.sf.carte.doc.Document
132132
DocumentBuilder builder;
133133
if (isHtml) {
134134
builder = new HtmlDocumentBuilder(domImpl);
135+
((HtmlDocumentBuilder) builder).setIgnoringComments(false);
135136
} else {
136137
XMLDocumentBuilder xmlbuilder = new XMLDocumentBuilder(domImpl);
137138
xmlbuilder.setIgnoreElementContentWhitespace(true);

0 commit comments

Comments
 (0)