gradle-license-plugin icon indicating copy to clipboard operation
gradle-license-plugin copied to clipboard

Invalid HTML in report

Open wkornewald opened this issue 3 years ago • 4 comments

In the HTML report the output contains <li>...</li> directly followed by the license text with <a...><pre> on the same level, but they must be wrapped in an <li> to be valid HTML.

wkornewald avatar Mar 25 '21 11:03 wkornewald

Can you post a sample here?

jaredsburrows avatar Sep 29 '21 05:09 jaredsburrows

The easiest way would be to change build.gradle to also generate the HTML report in this app: https://github.com/Digitaler-Impfnachweis/covpass-android

wkornewald avatar Oct 02 '21 07:10 wkornewald

I can confirm the issue. Sample attached. Validating with https://validator.w3.org/check

I am uncertain at which html level you aiming, as the report HTMl does not contain a DOCTYPE. forcing as html 3.2 and HTML 4.01 Transitional results in the mentioned violation.

Line 349, Column 21: document type does not allow element "A" here; assuming missing "LI" start-tag

licenseReleaseReport.zip

stephankn avatar Nov 07 '21 22:11 stephankn

I am not fluent in Kotlin. By looking at the source I guess that moving the ul { inside the foreach loop of hte next line should produce then valid html blocks. having a list of li, ending with the anchor and pre section of the license.

https://github.com/jaredsburrows/gradle-license-plugin/blob/732d2845a6fdafd339649b2aa5cb5e158af95bfa/src/main/kotlin/com/jaredsburrows/license/internal/report/HtmlReport.kt#L83

stephankn avatar Nov 07 '21 22:11 stephankn