aboutsummaryrefslogtreecommitdiff
path: root/plugins/base/src/main/kotlin/resolvers
diff options
context:
space:
mode:
authorMarcin Aman <marcin.aman@gmail.com>2020-10-01 09:59:52 +0200
committerKamil Doległo <9080183+kamildoleglo@users.noreply.github.com>2020-10-01 12:06:21 +0200
commitfbee5a49ee4c21bf0f31362bf1f9af46adba7a44 (patch)
treeb12c6671d39445fcf1b4389e8a5d59a5973d1095 /plugins/base/src/main/kotlin/resolvers
parent407105fbc9ecd455e675740e444a57917ab3a5d0 (diff)
downloaddokka-fbee5a49ee4c21bf0f31362bf1f9af46adba7a44.tar.gz
dokka-fbee5a49ee4c21bf0f31362bf1f9af46adba7a44.tar.bz2
dokka-fbee5a49ee4c21bf0f31362bf1f9af46adba7a44.zip
Escape urls in anchors
Diffstat (limited to 'plugins/base/src/main/kotlin/resolvers')
-rw-r--r--plugins/base/src/main/kotlin/resolvers/local/DokkaLocationProvider.kt3
1 files changed, 2 insertions, 1 deletions
diff --git a/plugins/base/src/main/kotlin/resolvers/local/DokkaLocationProvider.kt b/plugins/base/src/main/kotlin/resolvers/local/DokkaLocationProvider.kt
index 48e44f5f..fe8c8f84 100644
--- a/plugins/base/src/main/kotlin/resolvers/local/DokkaLocationProvider.kt
+++ b/plugins/base/src/main/kotlin/resolvers/local/DokkaLocationProvider.kt
@@ -8,6 +8,7 @@ import org.jetbrains.dokka.model.DisplaySourceSet
import org.jetbrains.dokka.model.withDescendants
import org.jetbrains.dokka.pages.*
import org.jetbrains.dokka.plugability.DokkaContext
+import org.jetbrains.dokka.utilities.urlEncoded
import java.util.*
open class DokkaLocationProvider(
@@ -68,7 +69,7 @@ open class DokkaLocationProvider(
private fun getLocalLocation(dri: Pair<DRI, DisplaySourceSet?>, context: PageNode?): String? =
pagesIndex[dri]?.let { resolve(it, context) }
- ?: anchorsIndex[dri]?.let { resolve(it, context) + "#${dri.first}" }
+ ?: anchorsIndex[dri]?.let { resolve(it, context) + "#${dri.first.toString().urlEncoded()}" }
override fun pathToRoot(from: PageNode): String =