gradle-license-plugin
gradle-license-plugin copied to clipboard
Invalid HTML in report
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.
Can you post a sample here?
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
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
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