Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Strange internal reference IDs in HTML #2803

Closed
TWiStErRob opened this issue Jan 9, 2023 · 2 comments · Fixed by #2813
Closed

Strange internal reference IDs in HTML #2803

TWiStErRob opened this issue Jan 9, 2023 · 2 comments · Fixed by #2813
Labels
bug format: Javadoc An issue/PR related to Dokka's Javadoc output format or the Javadoc comments in general

Comments

@TWiStErRob
Copy link
Contributor

Describe the bug
<a id="..." and <a name="..." and <a href="..." are containing weird values.
Here's an example (yes, this whole thing is ONE id, except it's invalid because it contains quotes and they're not escaped):

<a id="variantConfig(TypeAliased(typeAlias=GenericTypeConstructor(dri=net.twisterrob.gradle.common/BaseVariant///PointingToDeclaration/, projections=[], presentableName=null, extra=PropertyContainer(map={org.jetbrains.dokka.model.Annotations$Companion@3b321821=Annotations(myContent={DokkaSourceSetImpl(displayName=jvm, sourceSetID=:common:dokkaJavadoc/main, classpath=[P:\caches\gradle\caches\7.6\generated-gradle-jars\gradle-api-7.6.jar, P:\caches\gradle\wrapper\dists\gradle-7.6-all\9f832ih6bniajn45pbmqhk2cw\gradle-7.6\lib\groovy-3.0.13.jar, P:\caches\gradle\wrapper\dists\gradle-7.6-all\9f832ih6bniajn45pbmqhk2cw\gradle-7.6\lib\groovy-ant-3.0.13.jar, P:\caches\gradle\wrapper\dists\gradle-7.6-all\9f832ih6bniajn45pbmqhk2cw\gradle-7.6\lib\groovy-astbuilder-3.0.13.jar, P:\caches\gradle\wrapper\dists\gradle-7.6-all\9f832ih6bniajn45pbmqhk2cw\gradle-7.6\lib\groovy-console-3.0.13.jar, P:\caches\gradle\wrapper\dists\gradle-7.6-all\9f832ih6bniajn45pbmqhk2cw\gradle-7.6\lib\groovy-datetime-3.0.13.jar, P:\caches\gradle\wrapper\dists\gradle-7.6-all\9f832ih6bniajn45pbmqhk2cw\gradle-7.6\lib\groovy-dateutil-3.0.13.jar, P:\caches\gradle\wrapper\dists\gradle-7.6-all\9f832ih6bniajn45pbmqhk2cw\gradle-7.6\lib\groovy-groovydoc-3.0.13.jar, P:\caches\gradle\wrapper\dists\gradle-7.6-all\9f832ih6bniajn45pbmqhk2cw\gradle-7.6\lib\groovy-json-3.0.13.jar, P:\caches\gradle\wrapper\dists\gradle-7.6-all\9f832ih6bniajn45pbmqhk2cw\gradle-7.6\lib\groovy-nio-3.0.13.jar, P:\caches\gradle\wrapper\dists\gradle-7.6-all\9f832ih6bniajn45pbmqhk2cw\gradle-7.6\lib\groovy-sql-3.0.13.jar, P:\caches\gradle\wrapper\dists\gradle-7.6-all\9f832ih6bniajn45pbmqhk2cw\gradle-7.6\lib\groovy-templates-3.0.13.jar, P:\caches\gradle\wrapper\dists\gradle-7.6-all\9f832ih6bniajn45pbmqhk2cw\gradle-7.6\lib\groovy-test-3.0.13.jar, P:\caches\gradle\wrapper\dists\gradle-7.6-all\9f832ih6bniajn45pbmqhk2cw\gradle-7.6\lib\groovy-xml-3.0.13.jar, P:\caches\gradle\wrapper\dists\gradle-7.6-all\9f832ih6bniajn45pbmqhk2cw\gradle-7.6\lib\javaparser-core-3.17.0.jar, P:\caches\gradle\wrapper\dists\gradle-7.6-all\9f832ih6bniajn45pbmqhk2cw\gradle-7.6\lib\gradle-installation-beacon-7.6.jar, P:\projects\workspace\net.twisterrob.gradle\compat\agp-base\build\libs\twister-compat-agp-base-0.15-SNAPSHOT.jar, P:\projects\workspace\net.twisterrob.gradle\compat\gradle\build\libs\twister-compat-gradle-0.15-SNAPSHOT.jar, P:\caches\gradle\caches\modules-2\files-2.1\org.jetbrains.kotlin\kotlin-stdlib-jdk8\1.4.32\3302f9ec8a5c1ed220781dbd37770072549bd333\kotlin-stdlib-jdk8-1.4.32.jar, P:\caches\gradle\caches\modules-2\files-2.1\org.jetbrains.kotlin\kotlin-reflect\1.4.32\ce852b166d97f0f1991b5130c2bb02e2ef6c554e\kotlin-reflect-1.4.32.jar, P:\caches\gradle\caches\modules-2\files-2.1\org.jetbrains.kotlin\kotlin-stdlib-jdk7\1.4.32\3546900a3ebff0c43f31190baf87a9220e37b7ea\kotlin-stdlib-jdk7-1.4.32.jar, P:\caches\gradle\caches\modules-2\files-2.1\org.jetbrains.kotlin\kotlin-stdlib\1.4.32\461367948840adbb0839c51d91ed74ef4a9ccb52\kotlin-stdlib-1.4.32.jar, P:\caches\gradle\caches\modules-2\files-2.1\org.gradle\gradle-kotlin-dsl\6.1.1\4f811c43a0688fb76681c357033c734fa740d898\gradle-kotlin-dsl-6.1.1.jar, P:\caches\gradle\caches\modules-2\files-2.1\com.android.tools.build\gradle\7.3.1\e05fdef1532d40d90ef6d2f80f76dfc78d098bb9\gradle-7.3.1.jar, P:\caches\gradle\caches\modules-2\files-2.1\com.android.tools\common\30.3.1\6d00d4eaf6e80712b579a71e50f574483e6aef31\common-30.3.1.jar, P:\caches\gradle\caches\modules-2\files-2.1\com.google.guava\guava\30.1-jre\d0c3ce2311c9e36e73228da25a6e99b2ab826f\guava-30.1-jre.jar, P:\caches\gradle\caches\modules-2\files-2.1\com.google.code.findbugs\jsr305\3.0.2\25ea2e8b0c338a877313bd4672d3fe056ea78f0d\jsr305-3.0.2.jar, P:\caches\gradle\caches\modules-2\files-2.1\org.jetbrains\annotations\23.1.0\d095a317cafe983999c7c8ad14da1a503288b55e\annotations-23.1.0.jar, P:\caches\gradle\caches\modules-2\files-2.1\org.jetbrains.kotlin\kotlin-stdlib-common\1.4.32\ef50bfa2c0491a11dcc35d9822edbfd6170e1ea2\kotlin-stdlib-common-1.4.32.jar, P:\caches\gradle\caches\modules-2\files-2.1\com.android.tools.build\builder\7.3.1\3e23401ece1637cecbae6be5c02cc18ab7e452e5\builder-7.3.1.jar, P:\caches\gradle\caches\modules-2\files-2.1\com.android.tools.build\builder-model\7.3.1\fddc6058293b89467794f8fcd6bfb35e37739c48\builder-model-7.3.1.jar, P:\caches\gradle\caches\modules-2\files-2.1\com.android.tools.build\gradle-api\7.3.1\a2723750277a10ca522477752d98f996653ebf14\gradle-api-7.3.1.jar, P:\caches\gradle\caches\modules-2\files-2.1\com.android.tools\annotations\30.3.1\bf7c0de4844ebdce4eec08b202d24d8f1f7ac520\annotations-30.3.1.jar, P:\caches\gradle\caches\modules-2\files-2.1\com.android.tools.build\manifest-merger\30.3.1\71f4364c86bbe1ff328c6e5eac880d07c8c92943\manifest-merger-30.3.1.jar, P:\caches\gradle\caches\modules-2\files-2.1\com.android\zipflinger\7.3.1\16999dcec6ec960f9dc53c76081936bd545b4dc9\zipflinger-7.3.1.jar, P:\caches\gradle\caches\modules-2\files-2.1\com.android.tools.build\apksig\7.3.1\46b1d756b1dd2f41714f24c84b611306d39ec065\apksig-7.3.1.jar, P:\caches\gradle\caches\modules-2\files-2.1\com.android.tools.build\apkzlib\7.3.1\5b1abe37db589a8c57e1023c0c709d41424d87dd\apkzlib-7.3.1.jar, P:\caches\gradle\caches\modules-2\files-2.1\com.squareup\javawriter\2.5.0\81241ff7078ef14f42ea2a8995fa09c096256e6b\javawriter-2.5.0.jar, P:\caches\gradle\caches\modules-2\files-2.1\org.ow2.asm\asm\9.1\a99500cf6eea30535eeac6be73899d048f8d12a8\asm-9.1.jar, P:\caches\gradle\caches\modules-2\files-2.1\com.google.guava\failureaccess\1.0.1\1dcf1de382a0bf95a3d8b0849546c88bac1292c9\failureaccess-1.0.1.jar, P:\caches\gradle\caches\modules-2\files-2.1\com.google.guava\listenablefuture\9999.0-empty-to-avoid-conflict-with-guava\b421526c5f297295adef1c886e5246c39d4ac629\listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar, P:\caches\gradle\caches\modules-2\files-2.1\org.checkerframework\checker-qual\3.5.0\2f50520c8abea66fbd8d26e481d3aef5c673b510\checker-qual-3.5.0.jar, P:\caches\gradle\caches\modules-2\files-2.1\com.google.errorprone\error_prone_annotations\2.3.4\dac170e4594de319655ffb62f41cbd6dbb5e601e\error_prone_annotations-2.3.4.jar, P:\caches\gradle\caches\modules-2\files-2.1\com.google.j2objc\j2objc-annotations\1.3\ba035118bc8bac37d7eff77700720999acd9986d\j2objc-annotations-1.3.jar], sourceRoots=[P:\projects\workspace\net.twisterrob.gradle\common\src\main\java, P:\projects\workspace\net.twisterrob.gradle\common\src\main\kotlin], dependentSourceSets=[], samples=[], includes=[], includeNonPublic=false, reportUndocumented=false, skipEmptyPackages=true, skipDeprecated=false, jdkVersion=8, sourceLinks=[], perPackageOptions=[], externalDocumentationLinks=[ExternalDocumentationLinkImpl(url=https://docs.oracle.com/javase/8/docs/api/, packageListUrl=https://docs.oracle.com/javase/8/docs/api/package-list), ExternalDocumentationLinkImpl(url=https://kotlinlang.org/api/latest/jvm/stdlib/, packageListUrl=https://kotlinlang.org/api/latest/jvm/stdlib/package-list)], languageVersion=null, apiVersion=null, noStdlibLink=false, noJdkLink=false, suppressedFiles=[], analysisPlatform=jvm, documentedVisibilities=[PUBLIC])=[Annotation(dri=kotlin/Suppress///PointingToDeclaration/, params={names=ArrayValue(value=[TYPEALIAS_EXPANSION_DEPRECATION])}, mustBeDocumented=false, scope=DIRECT)]})})), inner=GenericTypeConstructor(dri=com.android.build.gradle.api/BaseVariant///PointingToDeclaration/, projections=[], presentableName=null, extra=PropertyContainer(map={org.jetbrains.dokka.model.Annotations$Companion@3b321821=Annotations(myContent={DokkaSourceSetImpl(displayName=jvm, sourceSetID=:common:dokkaJavadoc/main, classpath=[P:\caches\gradle\caches\7.6\generated-gradle-jars\gradle-api-7.6.jar, P:\caches\gradle\wrapper\dists\gradle-7.6-all\9f832ih6bniajn45pbmqhk2cw\gradle-7.6\lib\groovy-3.0.13.jar, P:\caches\gradle\wrapper\dists\gradle-7.6-all\9f832ih6bniajn45pbmqhk2cw\gradle-7.6\lib\groovy-ant-3.0.13.jar, P:\caches\gradle\wrapper\dists\gradle-7.6-all\9f832ih6bniajn45pbmqhk2cw\gradle-7.6\lib\groovy-astbuilder-3.0.13.jar, P:\caches\gradle\wrapper\dists\gradle-7.6-all\9f832ih6bniajn45pbmqhk2cw\gradle-7.6\lib\groovy-console-3.0.13.jar, P:\caches\gradle\wrapper\dists\gradle-7.6-all\9f832ih6bniajn45pbmqhk2cw\gradle-7.6\lib\groovy-datetime-3.0.13.jar, P:\caches\gradle\wrapper\dists\gradle-7.6-all\9f832ih6bniajn45pbmqhk2cw\gradle-7.6\lib\groovy-dateutil-3.0.13.jar, P:\caches\gradle\wrapper\dists\gradle-7.6-all\9f832ih6bniajn45pbmqhk2cw\gradle-7.6\lib\groovy-groovydoc-3.0.13.jar, P:\caches\gradle\wrapper\dists\gradle-7.6-all\9f832ih6bniajn45pbmqhk2cw\gradle-7.6\lib\groovy-json-3.0.13.jar, P:\caches\gradle\wrapper\dists\gradle-7.6-all\9f832ih6bniajn45pbmqhk2cw\gradle-7.6\lib\groovy-nio-3.0.13.jar, P:\caches\gradle\wrapper\dists\gradle-7.6-all\9f832ih6bniajn45pbmqhk2cw\gradle-7.6\lib\groovy-sql-3.0.13.jar, P:\caches\gradle\wrapper\dists\gradle-7.6-all\9f832ih6bniajn45pbmqhk2cw\gradle-7.6\lib\groovy-templates-3.0.13.jar, P:\caches\gradle\wrapper\dists\gradle-7.6-all\9f832ih6bniajn45pbmqhk2cw\gradle-7.6\lib\groovy-test-3.0.13.jar, P:\caches\gradle\wrapper\dists\gradle-7.6-all\9f832ih6bniajn45pbmqhk2cw\gradle-7.6\lib\groovy-xml-3.0.13.jar, P:\caches\gradle\wrapper\dists\gradle-7.6-all\9f832ih6bniajn45pbmqhk2cw\gradle-7.6\lib\javaparser-core-3.17.0.jar, P:\caches\gradle\wrapper\dists\gradle-7.6-all\9f832ih6bniajn45pbmqhk2cw\gradle-7.6\lib\gradle-installation-beacon-7.6.jar, P:\projects\workspace\net.twisterrob.gradle\compat\agp-base\build\libs\twister-compat-agp-base-0.15-SNAPSHOT.jar, P:\projects\workspace\net.twisterrob.gradle\compat\gradle\build\libs\twister-compat-gradle-0.15-SNAPSHOT.jar, P:\caches\gradle\caches\modules-2\files-2.1\org.jetbrains.kotlin\kotlin-stdlib-jdk8\1.4.32\3302f9ec8a5c1ed220781dbd37770072549bd333\kotlin-stdlib-jdk8-1.4.32.jar, P:\caches\gradle\caches\modules-2\files-2.1\org.jetbrains.kotlin\kotlin-reflect\1.4.32\ce852b166d97f0f1991b5130c2bb02e2ef6c554e\kotlin-reflect-1.4.32.jar, P:\caches\gradle\caches\modules-2\files-2.1\org.jetbrains.kotlin\kotlin-stdlib-jdk7\1.4.32\3546900a3ebff0c43f31190baf87a9220e37b7ea\kotlin-stdlib-jdk7-1.4.32.jar, P:\caches\gradle\caches\modules-2\files-2.1\org.jetbrains.kotlin\kotlin-stdlib\1.4.32\461367948840adbb0839c51d91ed74ef4a9ccb52\kotlin-stdlib-1.4.32.jar, P:\caches\gradle\caches\modules-2\files-2.1\org.gradle\gradle-kotlin-dsl\6.1.1\4f811c43a0688fb76681c357033c734fa740d898\gradle-kotlin-dsl-6.1.1.jar, P:\caches\gradle\caches\modules-2\files-2.1\com.android.tools.build\gradle\7.3.1\e05fdef1532d40d90ef6d2f80f76dfc78d098bb9\gradle-7.3.1.jar, P:\caches\gradle\caches\modules-2\files-2.1\com.android.tools\common\30.3.1\6d00d4eaf6e80712b579a71e50f574483e6aef31\common-30.3.1.jar, P:\caches\gradle\caches\modules-2\files-2.1\com.google.guava\guava\30.1-jre\d0c3ce2311c9e36e73228da25a6e99b2ab826f\guava-30.1-jre.jar, P:\caches\gradle\caches\modules-2\files-2.1\com.google.code.findbugs\jsr305\3.0.2\25ea2e8b0c338a877313bd4672d3fe056ea78f0d\jsr305-3.0.2.jar, P:\caches\gradle\caches\modules-2\files-2.1\org.jetbrains\annotations\23.1.0\d095a317cafe983999c7c8ad14da1a503288b55e\annotations-23.1.0.jar, P:\caches\gradle\caches\modules-2\files-2.1\org.jetbrains.kotlin\kotlin-stdlib-common\1.4.32\ef50bfa2c0491a11dcc35d9822edbfd6170e1ea2\kotlin-stdlib-common-1.4.32.jar, P:\caches\gradle\caches\modules-2\files-2.1\com.android.tools.build\builder\7.3.1\3e23401ece1637cecbae6be5c02cc18ab7e452e5\builder-7.3.1.jar, P:\caches\gradle\caches\modules-2\files-2.1\com.android.tools.build\builder-model\7.3.1\fddc6058293b89467794f8fcd6bfb35e37739c48\builder-model-7.3.1.jar, P:\caches\gradle\caches\modules-2\files-2.1\com.android.tools.build\gradle-api\7.3.1\a2723750277a10ca522477752d98f996653ebf14\gradle-api-7.3.1.jar, P:\caches\gradle\caches\modules-2\files-2.1\com.android.tools\annotations\30.3.1\bf7c0de4844ebdce4eec08b202d24d8f1f7ac520\annotations-30.3.1.jar, P:\caches\gradle\caches\modules-2\files-2.1\com.android.tools.build\manifest-merger\30.3.1\71f4364c86bbe1ff328c6e5eac880d07c8c92943\manifest-merger-30.3.1.jar, P:\caches\gradle\caches\modules-2\files-2.1\com.android\zipflinger\7.3.1\16999dcec6ec960f9dc53c76081936bd545b4dc9\zipflinger-7.3.1.jar, P:\caches\gradle\caches\modules-2\files-2.1\com.android.tools.build\apksig\7.3.1\46b1d756b1dd2f41714f24c84b611306d39ec065\apksig-7.3.1.jar, P:\caches\gradle\caches\modules-2\files-2.1\com.android.tools.build\apkzlib\7.3.1\5b1abe37db589a8c57e1023c0c709d41424d87dd\apkzlib-7.3.1.jar, P:\caches\gradle\caches\modules-2\files-2.1\com.squareup\javawriter\2.5.0\81241ff7078ef14f42ea2a8995fa09c096256e6b\javawriter-2.5.0.jar, P:\caches\gradle\caches\modules-2\files-2.1\org.ow2.asm\asm\9.1\a99500cf6eea30535eeac6be73899d048f8d12a8\asm-9.1.jar, P:\caches\gradle\caches\modules-2\files-2.1\com.google.guava\failureaccess\1.0.1\1dcf1de382a0bf95a3d8b0849546c88bac1292c9\failureaccess-1.0.1.jar, P:\caches\gradle\caches\modules-2\files-2.1\com.google.guava\listenablefuture\9999.0-empty-to-avoid-conflict-with-guava\b421526c5f297295adef1c886e5246c39d4ac629\listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar, P:\caches\gradle\caches\modules-2\files-2.1\org.checkerframework\checker-qual\3.5.0\2f50520c8abea66fbd8d26e481d3aef5c673b510\checker-qual-3.5.0.jar, P:\caches\gradle\caches\modules-2\files-2.1\com.google.errorprone\error_prone_annotations\2.3.4\dac170e4594de319655ffb62f41cbd6dbb5e601e\error_prone_annotations-2.3.4.jar, P:\caches\gradle\caches\modules-2\files-2.1\com.google.j2objc\j2objc-annotations\1.3\ba035118bc8bac37d7eff77700720999acd9986d\j2objc-annotations-1.3.jar], sourceRoots=[P:\projects\workspace\net.twisterrob.gradle\common\src\main\java, P:\projects\workspace\net.twisterrob.gradle\common\src\main\kotlin], dependentSourceSets=[], samples=[], includes=[], includeNonPublic=false, reportUndocumented=false, skipEmptyPackages=true, skipDeprecated=false, jdkVersion=8, sourceLinks=[], perPackageOptions=[], externalDocumentationLinks=[ExternalDocumentationLinkImpl(url=https://docs.oracle.com/javase/8/docs/api/, packageListUrl=https://docs.oracle.com/javase/8/docs/api/package-list), ExternalDocumentationLinkImpl(url=https://kotlinlang.org/api/latest/jvm/stdlib/, packageListUrl=https://kotlinlang.org/api/latest/jvm/stdlib/package-list)], languageVersion=null, apiVersion=null, noStdlibLink=false, noJdkLink=false, suppressedFiles=[], analysisPlatform=jvm, documentedVisibilities=[PUBLIC])=[Annotation(dri=kotlin/Suppress///PointingToDeclaration/, params={names=ArrayValue(value=[TYPEALIAS_EXPANSION_DEPRECATION])}, mustBeDocumented=false, scope=DIRECT)]})})), extra=PropertyContainer(map={org.jetbrains.dokka.model.Annotations$Companion@3b321821=Annotations(myContent={DokkaSourceSetImpl(displayName=jvm, sourceSetID=:common:dokkaJavadoc/main, classpath=[P:\caches\gradle\caches\7.6\generated-gradle-jars\gradle-api-7.6.jar, P:\caches\gradle\wrapper\dists\gradle-7.6-all\9f832ih6bniajn45pbmqhk2cw\gradle-7.6\lib\groovy-3.0.13.jar, P:\caches\gradle\wrapper\dists\gradle-7.6-all\9f832ih6bniajn45pbmqhk2cw\gradle-7.6\lib\groovy-ant-3.0.13.jar, P:\caches\gradle\wrapper\dists\gradle-7.6-all\9f832ih6bniajn45pbmqhk2cw\gradle-7.6\lib\groovy-astbuilder-3.0.13.jar, P:\caches\gradle\wrapper\dists\gradle-7.6-all\9f832ih6bniajn45pbmqhk2cw\gradle-7.6\lib\groovy-console-3.0.13.jar, P:\caches\gradle\wrapper\dists\gradle-7.6-all\9f832ih6bniajn45pbmqhk2cw\gradle-7.6\lib\groovy-datetime-3.0.13.jar, P:\caches\gradle\wrapper\dists\gradle-7.6-all\9f832ih6bniajn45pbmqhk2cw\gradle-7.6\lib\groovy-dateutil-3.0.13.jar, P:\caches\gradle\wrapper\dists\gradle-7.6-all\9f832ih6bniajn45pbmqhk2cw\gradle-7.6\lib\groovy-groovydoc-3.0.13.jar, P:\caches\gradle\wrapper\dists\gradle-7.6-all\9f832ih6bniajn45pbmqhk2cw\gradle-7.6\lib\groovy-json-3.0.13.jar, P:\caches\gradle\wrapper\dists\gradle-7.6-all\9f832ih6bniajn45pbmqhk2cw\gradle-7.6\lib\groovy-nio-3.0.13.jar, P:\caches\gradle\wrapper\dists\gradle-7.6-all\9f832ih6bniajn45pbmqhk2cw\gradle-7.6\lib\groovy-sql-3.0.13.jar, P:\caches\gradle\wrapper\dists\gradle-7.6-all\9f832ih6bniajn45pbmqhk2cw\gradle-7.6\lib\groovy-templates-3.0.13.jar, P:\caches\gradle\wrapper\dists\gradle-7.6-all\9f832ih6bniajn45pbmqhk2cw\gradle-7.6\lib\groovy-test-3.0.13.jar, P:\caches\gradle\wrapper\dists\gradle-7.6-all\9f832ih6bniajn45pbmqhk2cw\gradle-7.6\lib\groovy-xml-3.0.13.jar, P:\caches\gradle\wrapper\dists\gradle-7.6-all\9f832ih6bniajn45pbmqhk2cw\gradle-7.6\lib\javaparser-core-3.17.0.jar, P:\caches\gradle\wrapper\dists\gradle-7.6-all\9f832ih6bniajn45pbmqhk2cw\gradle-7.6\lib\gradle-installation-beacon-7.6.jar, P:\projects\workspace\net.twisterrob.gradle\compat\agp-base\build\libs\twister-compat-agp-base-0.15-SNAPSHOT.jar, P:\projects\workspace\net.twisterrob.gradle\compat\gradle\build\libs\twister-compat-gradle-0.15-SNAPSHOT.jar, P:\caches\gradle\caches\modules-2\files-2.1\org.jetbrains.kotlin\kotlin-stdlib-jdk8\1.4.32\3302f9ec8a5c1ed220781dbd37770072549bd333\kotlin-stdlib-jdk8-1.4.32.jar, P:\caches\gradle\caches\modules-2\files-2.1\org.jetbrains.kotlin\kotlin-reflect\1.4.32\ce852b166d97f0f1991b5130c2bb02e2ef6c554e\kotlin-reflect-1.4.32.jar, P:\caches\gradle\caches\modules-2\files-2.1\org.jetbrains.kotlin\kotlin-stdlib-jdk7\1.4.32\3546900a3ebff0c43f31190baf87a9220e37b7ea\kotlin-stdlib-jdk7-1.4.32.jar, P:\caches\gradle\caches\modules-2\files-2.1\org.jetbrains.kotlin\kotlin-stdlib\1.4.32\461367948840adbb0839c51d91ed74ef4a9ccb52\kotlin-stdlib-1.4.32.jar, P:\caches\gradle\caches\modules-2\files-2.1\org.gradle\gradle-kotlin-dsl\6.1.1\4f811c43a0688fb76681c357033c734fa740d898\gradle-kotlin-dsl-6.1.1.jar, P:\caches\gradle\caches\modules-2\files-2.1\com.android.tools.build\gradle\7.3.1\e05fdef1532d40d90ef6d2f80f76dfc78d098bb9\gradle-7.3.1.jar, P:\caches\gradle\caches\modules-2\files-2.1\com.android.tools\common\30.3.1\6d00d4eaf6e80712b579a71e50f574483e6aef31\common-30.3.1.jar, P:\caches\gradle\caches\modules-2\files-2.1\com.google.guava\guava\30.1-jre\d0c3ce2311c9e36e73228da25a6e99b2ab826f\guava-30.1-jre.jar, P:\caches\gradle\caches\modules-2\files-2.1\com.google.code.findbugs\jsr305\3.0.2\25ea2e8b0c338a877313bd4672d3fe056ea78f0d\jsr305-3.0.2.jar, P:\caches\gradle\caches\modules-2\files-2.1\org.jetbrains\annotations\23.1.0\d095a317cafe983999c7c8ad14da1a503288b55e\annotations-23.1.0.jar, P:\caches\gradle\caches\modules-2\files-2.1\org.jetbrains.kotlin\kotlin-stdlib-common\1.4.32\ef50bfa2c0491a11dcc35d9822edbfd6170e1ea2\kotlin-stdlib-common-1.4.32.jar, P:\caches\gradle\caches\modules-2\files-2.1\com.android.tools.build\builder\7.3.1\3e23401ece1637cecbae6be5c02cc18ab7e452e5\builder-7.3.1.jar, P:\caches\gradle\caches\modules-2\files-2.1\com.android.tools.build\builder-model\7.3.1\fddc6058293b89467794f8fcd6bfb35e37739c48\builder-model-7.3.1.jar, P:\caches\gradle\caches\modules-2\files-2.1\com.android.tools.build\gradle-api\7.3.1\a2723750277a10ca522477752d98f996653ebf14\gradle-api-7.3.1.jar, P:\caches\gradle\caches\modules-2\files-2.1\com.android.tools\annotations\30.3.1\bf7c0de4844ebdce4eec08b202d24d8f1f7ac520\annotations-30.3.1.jar, P:\caches\gradle\caches\modules-2\files-2.1\com.android.tools.build\manifest-merger\30.3.1\71f4364c86bbe1ff328c6e5eac880d07c8c92943\manifest-merger-30.3.1.jar, P:\caches\gradle\caches\modules-2\files-2.1\com.android\zipflinger\7.3.1\16999dcec6ec960f9dc53c76081936bd545b4dc9\zipflinger-7.3.1.jar, P:\caches\gradle\caches\modules-2\files-2.1\com.android.tools.build\apksig\7.3.1\46b1d756b1dd2f41714f24c84b611306d39ec065\apksig-7.3.1.jar, P:\caches\gradle\caches\modules-2\files-2.1\com.android.tools.build\apkzlib\7.3.1\5b1abe37db589a8c57e1023c0c709d41424d87dd\apkzlib-7.3.1.jar, P:\caches\gradle\caches\modules-2\files-2.1\com.squareup\javawriter\2.5.0\81241ff7078ef14f42ea2a8995fa09c096256e6b\javawriter-2.5.0.jar, P:\caches\gradle\caches\modules-2\files-2.1\org.ow2.asm\asm\9.1\a99500cf6eea30535eeac6be73899d048f8d12a8\asm-9.1.jar, P:\caches\gradle\caches\modules-2\files-2.1\com.google.guava\failureaccess\1.0.1\1dcf1de382a0bf95a3d8b0849546c88bac1292c9\failureaccess-1.0.1.jar, P:\caches\gradle\caches\modules-2\files-2.1\com.google.guava\listenablefuture\9999.0-empty-to-avoid-conflict-with-guava\b421526c5f297295adef1c886e5246c39d4ac629\listenablefuture-9999.0-empty-to-avoid-conflict-with-guava.jar, P:\caches\gradle\caches\modules-2\files-2.1\org.checkerframework\checker-qual\3.5.0\2f50520c8abea66fbd8d26e481d3aef5c673b510\checker-qual-3.5.0.jar, P:\caches\gradle\caches\modules-2\files-2.1\com.google.errorprone\error_prone_annotations\2.3.4\dac170e4594de319655ffb62f41cbd6dbb5e601e\error_prone_annotations-2.3.4.jar, P:\caches\gradle\caches\modules-2\files-2.1\com.google.j2objc\j2objc-annotations\1.3\ba035118bc8bac37d7eff77700720999acd9986d\j2objc-annotations-1.3.jar], sourceRoots=[P:\projects\workspace\net.twisterrob.gradle\common\src\main\java, P:\projects\workspace\net.twisterrob.gradle\common\src\main\kotlin], dependentSourceSets=[], samples=[], includes=[], includeNonPublic=false, reportUndocumented=false, skipEmptyPackages=true, skipDeprecated=false, jdkVersion=8, sourceLinks=[], perPackageOptions=[], externalDocumentationLinks=[ExternalDocumentationLinkImpl(url=https://docs.oracle.com/javase/8/docs/api/, packageListUrl=https://docs.oracle.com/javase/8/docs/api/package-list), ExternalDocumentationLinkImpl(url=https://kotlinlang.org/api/latest/jvm/stdlib/, packageListUrl=https://kotlinlang.org/api/latest/jvm/stdlib/package-list)], languageVersion=null, apiVersion=null, noStdlibLink=false, noJdkLink=false, suppressedFiles=[], analysisPlatform=jvm, documentedVisibilities=[PUBLIC])=[Annotation(dri=kotlin/Suppress///PointingToDeclaration/, params={names=ArrayValue(value=[TYPEALIAS_EXPANSION_DEPRECATION])}, mustBeDocumented=false, scope=DIRECT)]})})))">

Expected behaviour
Short and valid references within the docs. Not exposing local file paths of the build machine / CI that creates the docs (it might be a security risk based on the threat model).

Screenshots

Raw Inspect
image image

To Reproduce

  1. Clone https://github.com/TWiStErRob/net.twisterrob.gradle/tree/16913c5a1d91c3f3ceed82decc25b845e70e093c
  2. gradlew dokkaJavadoc
  3. View raw text of common\build\dokka\javadoc\net\twisterrob\gradle\common\VariantTaskCreator.html or inspect variantConfig method's link or anchor.

Dokka configuration
Configuration of dokka used to reproduce the bug

Installation

  • Operating system: Windows 10
  • Build tool: Gradle 7.6
  • Dokka version: 1.7.20

Additional context
Looks like a deep toString of some DSL object, so it might be a trivial fix. Also note that the value is used raw without any HTML escaping, so it's generates invalid/unsafe HTML with easy injection point.

@TWiStErRob TWiStErRob added the bug label Jan 9, 2023
@IgnatBeresnev IgnatBeresnev added the format: Javadoc An issue/PR related to Dokka's Javadoc output format or the Javadoc comments in general label Jan 13, 2023
@IgnatBeresnev
Copy link
Member

IgnatBeresnev commented Jan 13, 2023

Wow, that's bad. Thanks for noticing and reporting it, and especially thanks for the reproducer - I was able to find the cause very quickly.

Looks like a deep toString of some DSL object

Indeed, the problem was basically this:

when(sealed) {
    ...
    else -> sealed.toString()
}

There was no branch for typealias declarations, so it defaulted to toString()

Since we're doing when on a sealed class, I've removed the else branch and added implementations for remaining cases, so hopefully it doesn't happen again.

@TWiStErRob
Copy link
Contributor Author

Also note that the value is used raw without any HTML escaping, so it's generates invalid/unsafe HTML with easy injection point.

This could be a problem when the Kotlin name allows characters that are not valid HTML IDs, for example space. There should be some escaping.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug format: Javadoc An issue/PR related to Dokka's Javadoc output format or the Javadoc comments in general
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants