
org.jetbrains.kotlinx.jupyter.util.HtmlUtil.kt Maven / Gradle / Ivy
package org.jetbrains.kotlinx.jupyter.util
fun String.escapeForIframe(): String {
val text = this
return buildString {
for (c in text) {
when (c) {
'&' -> append("&")
'"' -> append(""")
'\\' -> append("\")
'/' -> append("/")
'<' -> append("<")
'>' -> append(">")
else -> append(c)
}
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy