File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
core/src/test/kotlin/org/jetbrains/kotlinx/dataframe/explainer Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -314,16 +314,22 @@ private fun convertToDescription(dataframeLike: Any): String =
314314 else -> throw IllegalArgumentException (" Unsupported type: ${dataframeLike::class } " )
315315 }.escapeHtmlForIFrame()
316316
317- internal fun String.escapeHtmlForIFrame (): String {
318- return buildString {
317+ internal fun String.escapeHtmlForIFrame (): String =
318+ buildString {
319319 for (c in this @escapeHtmlForIFrame) {
320320 when (c) {
321321 ' <' -> append(" <" )
322+
322323 ' >' -> append(" >" )
324+
323325 ' &' -> append(" &" )
326+
324327 ' "' -> append(" "" )
328+
325329 ' \' ' -> append(" '" )
330+
326331 ' \\ ' -> append(" \" )
332+
327333 else -> {
328334 if (c.code > 127 ) {
329335 append(" &#${c.code} ;" )
@@ -334,4 +340,3 @@ internal fun String.escapeHtmlForIFrame(): String {
334340 }
335341 }
336342 }
337- }
You can’t perform that action at this time.
0 commit comments