Skip to content

Commit

Permalink
https://github.com/aim42/htmlSanityCheck/issues/287
Browse files Browse the repository at this point in the history
  • Loading branch information
oliva123456 committed Sep 28, 2023
1 parent 9fb0684 commit 614b4c9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ dependencies {


// jsoup is our awesome html parser, see jsoup.org
implementation group: 'org.jsoup', name: 'jsoup', version: '1.11.3'
implementation group: 'org.jsoup', name: 'jsoup', version: '1.16.1'


} // dependencies
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class AllChecksRunnerTest extends GroovyTestCase {

@Test
public void testSingleCorrectHTMLFile() {
String HTML = """$HTML_HEAD<body><title>hsc</title></body></html>"""
String HTML = """$HTML_HEAD<title>hsc</title><body></body></html>"""

// create file with proper html content
tmpFile = File.createTempFile("testfile", ".html") <<HTML
Expand Down

1 comment on commit 614b4c9

@oliva123456
Copy link
Owner Author

@oliva123456 oliva123456 commented on 614b4c9 Sep 28, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AllChecksRunnerTest#testSingleCorrectHTMLFile had problems with newer versions of Jsoup. Reason is, that the title-attribute should not be placed after the body-tag.

Clarification: https://www.w3schools.com/html/html_head.asp
The HTML <head> element is a container for the following elements: <title>.....

=> title should either be embedded within the head-tag or at least be placed before the body-tag.

Therefore the html-string has been adopted to meet the specs. Parsing with Jsoup succeeds afterwards.

Please sign in to comment.