aboutsummaryrefslogtreecommitdiff
path: root/core/src/main/kotlin/Utilities/Html.kt
diff options
context:
space:
mode:
authoraleksZubakov <aleks.zubakov@gmail.com>2018-07-16 16:56:11 +0300
committeraleksZubakov <aleks.zubakov@gmail.com>2018-07-16 17:05:25 +0300
commit755b701a4720bf1d0690935898f46dd36c205936 (patch)
treeec2af23fc2a4c28c1b0e4f1d73ee55bd26845cf4 /core/src/main/kotlin/Utilities/Html.kt
parentb3e33f620a387d4623ed7f6d7665fcbed98efffb (diff)
parentf30807f4e78939fb59f8e46c39b3e538070aacfd (diff)
downloaddokka-755b701a4720bf1d0690935898f46dd36c205936.tar.gz
dokka-755b701a4720bf1d0690935898f46dd36c205936.tar.bz2
dokka-755b701a4720bf1d0690935898f46dd36c205936.zip
Merge branch 'devsite-fixes-backport' into dev-multiplatf
# Conflicts: # core/src/main/kotlin/Analysis/AnalysisEnvironment.kt # core/src/test/kotlin/TestAPI.kt
Diffstat (limited to 'core/src/main/kotlin/Utilities/Html.kt')
-rw-r--r--core/src/main/kotlin/Utilities/Html.kt4
1 files changed, 4 insertions, 0 deletions
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