aboutsummaryrefslogtreecommitdiff
path: root/src/Utilities
diff options
context:
space:
mode:
Diffstat (limited to 'src/Utilities')
-rw-r--r--src/Utilities/Html.kt7
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("&", "&amp;").replace("<", "&lt;").replace(">", "&gt;")
+
+/**
+ * Replaces symbols reserved in HTML with their respective entities.
+ * Replaces & with &amp;, < with &lt; and > with &gt;
+ */
+public fun String.htmlEscape(): String = replace("&", "&amp;").replace("<", "&lt;").replace(">", "&gt;")