From ad35def2efbb6eae6fae423bb639890aaa2cb93f Mon Sep 17 00:00:00 2001 From: Simon Ogorodnik Date: Fri, 13 Jul 2018 18:36:31 +0300 Subject: Add missing urlEncoded function for JLH --- core/src/main/kotlin/Utilities/Html.kt | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'core/src/main/kotlin/Utilities') 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 &, < with < and > with > */ fun String.htmlEscape(): String = replace("&", "&").replace("<", "<").replace(">", ">") + +fun String.urlEncoded(): String = URLEncoder.encode(this, "UTF-8") \ No newline at end of file -- cgit