htmlEscape

fun String.htmlEscape(): String

Replaces symbols reserved in HTML with their respective entities. Replaces & with &amp;, < with &lt; and with &gt;