aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Ogorodnik <Simon.Ogorodnik@jetbrains.com>2018-07-13 18:36:31 +0300
committerSimon Ogorodnik <Simon.Ogorodnik@jetbrains.com>2018-07-13 18:36:31 +0300
commitad35def2efbb6eae6fae423bb639890aaa2cb93f (patch)
treeb093169d43044669d49a168dcc84e6c78a55471d
parent8883839b8796589a1fa02b3dca5d1aae172b5c56 (diff)
downloaddokka-ad35def2efbb6eae6fae423bb639890aaa2cb93f.tar.gz
dokka-ad35def2efbb6eae6fae423bb639890aaa2cb93f.tar.bz2
dokka-ad35def2efbb6eae6fae423bb639890aaa2cb93f.zip
Add missing urlEncoded function for JLH
-rw-r--r--core/src/main/kotlin/Formats/JavaLayoutHtml/JavaLayoutHtmlPackageListService.kt5
-rw-r--r--core/src/main/kotlin/Utilities/Html.kt4
2 files changed, 5 insertions, 4 deletions
diff --git a/core/src/main/kotlin/Formats/JavaLayoutHtml/JavaLayoutHtmlPackageListService.kt b/core/src/main/kotlin/Formats/JavaLayoutHtml/JavaLayoutHtmlPackageListService.kt
index d04ed64b..6d9b5fd0 100644
--- a/core/src/main/kotlin/Formats/JavaLayoutHtml/JavaLayoutHtmlPackageListService.kt
+++ b/core/src/main/kotlin/Formats/JavaLayoutHtml/JavaLayoutHtmlPackageListService.kt
@@ -1,10 +1,7 @@
package org.jetbrains.dokka.Formats
-import org.jetbrains.dokka.DocumentationModule
+import org.jetbrains.dokka.*
import org.jetbrains.dokka.ExternalDocumentationLinkResolver.Companion.DOKKA_PARAM_PREFIX
-import org.jetbrains.dokka.InboundExternalLinkResolutionService
-import org.jetbrains.dokka.NodeKind
-import org.jetbrains.dokka.PackageListService
import org.jetbrains.kotlin.descriptors.*
import org.jetbrains.kotlin.resolve.descriptorUtil.fqNameUnsafe
import org.jetbrains.kotlin.resolve.descriptorUtil.isCompanionObject
diff --git a/core/src/main/kotlin/Utilities/Html.kt b/core/src/main/kotlin/Utilities/Html.kt
index a5a93d9e..de1ce1a5 100644
--- a/core/src/main/kotlin/Utilities/Html.kt
+++ b/core/src/main/kotlin/Utilities/Html.kt
@@ -1,8 +1,12 @@
package org.jetbrains.dokka
+import java.net.URLEncoder
+
/**
* Replaces symbols reserved in HTML with their respective entities.
* Replaces & with &amp;, < with &lt; and > with &gt;
*/
fun String.htmlEscape(): String = replace("&", "&amp;").replace("<", "&lt;").replace(">", "&gt;")
+
+fun String.urlEncoded(): String = URLEncoder.encode(this, "UTF-8") \ No newline at end of file