diff options
Diffstat (limited to 'src/Utilities')
-rw-r--r-- | src/Utilities/Html.kt | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/Utilities/Html.kt b/src/Utilities/Html.kt index a4fd5fae..9630c8cb 100644 --- a/src/Utilities/Html.kt +++ b/src/Utilities/Html.kt @@ -1,4 +1,9 @@ package org.jetbrains.dokka -fun String.htmlEscape() = replace("&", "&").replace("<", "<").replace(">", ">") + +/** + * Replaces symbols reserved in HTML with their respective entities. + * Replaces & with &, < with < and > with > + */ +public fun String.htmlEscape(): String = replace("&", "&").replace("<", "<").replace(">", ">") |