Skip to content

Commit 97229bc

Browse files
committed
fix escaping for embedding into iframe srcdoc
1 parent 66bcb51 commit 97229bc

13 files changed

+23
-20
lines changed

core/src/test/kotlin/org/jetbrains/kotlinx/dataframe/explainer/PluginCallback.kt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -333,9 +333,12 @@ internal fun String.escapeHTML(): String {
333333
append(c.code)
334334
append(';')
335335
}
336-
c == '<' -> append("&lt;")
337-
c == '>' -> append("&gt;")
336+
// c == '<' -> append("&lt;")
337+
// c == '>' -> append("&gt;")
338338
c == '"' -> append("&quot;")
339+
c == '<' -> append("&amp;lt;")
340+
c == '>' -> append("&amp;gt;")
341+
// c == '"' -> append("&amp;quot;")
339342
c == '&' -> append("&amp;")
340343
else -> {
341344
append(c)

docs/StardustDocs/snippets/org.jetbrains.kotlinx.dataframe.samples.api.Access.columnSelectorsMisc.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,7 @@
325325
</details>
326326
<br>
327327
<details>
328-
<summary>df.select { colsOf&lt;String&gt;() }</summary>
328+
<summary>df.select { colsOf&amp;lt;String&amp;gt;() }</summary>
329329

330330
<details>
331331
<summary>Input DataFrame: rowsCount = 7, columnsCount = 6</summary>
@@ -342,7 +342,7 @@
342342
</details>
343343
<br>
344344
<details>
345-
<summary>df.select { colsOf&lt;String?&gt; { it.countDistinct() &gt; 5 } }</summary>
345+
<summary>df.select { colsOf&amp;lt;String?&amp;gt; { it.countDistinct() &amp;gt; 5 } }</summary>
346346

347347
<details>
348348
<summary>Input DataFrame: rowsCount = 7, columnsCount = 6</summary>
@@ -550,7 +550,7 @@
550550
</details>
551551
<br>
552552
<details>
553-
<summary>df.select { dfsOf&lt;String&gt;() }</summary>
553+
<summary>df.select { dfsOf&amp;lt;String&amp;gt;() }</summary>
554554

555555
<details>
556556
<summary>Input DataFrame: rowsCount = 7, columnsCount = 6</summary>
@@ -567,7 +567,7 @@
567567
</details>
568568
<br>
569569
<details>
570-
<summary>df.select { except { colsOf&lt;String&gt;() } }</summary>
570+
<summary>df.select { except { colsOf&amp;lt;String&amp;gt;() } }</summary>
571571

572572
<details>
573573
<summary>Input DataFrame: rowsCount = 7, columnsCount = 6</summary>

docs/StardustDocs/snippets/org.jetbrains.kotlinx.dataframe.samples.api.Access.columnSelectorsModifySet.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@
316316
</details>
317317
<br>
318318
<details>
319-
<summary>df.select { (colsOf&lt;Int&gt;() and age).distinct() }</summary>
319+
<summary>df.select { (colsOf&amp;lt;Int&amp;gt;() and age).distinct() }</summary>
320320

321321
<details>
322322
<summary>Input DataFrame: rowsCount = 7, columnsCount = 5</summary>

docs/StardustDocs/snippets/org.jetbrains.kotlinx.dataframe.samples.api.Access.columnSelectorsUsages.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@
237237
</details>
238238
<br>
239239
<details>
240-
<summary>df.fillNaNs { dfsOf&lt;Double&gt;() }.withZero()</summary>
240+
<summary>df.fillNaNs { dfsOf&amp;lt;Double&amp;gt;() }.withZero()</summary>
241241

242242
<details>
243243
<summary>Input DataFrame: rowsCount = 7, columnsCount = 5</summary>
@@ -317,7 +317,7 @@
317317
</details>
318318
<br>
319319
<details>
320-
<summary>df.gather { colsOf&lt;Number&gt;() }.into(&quot;key&quot;, &quot;value&quot;)</summary>
320+
<summary>df.gather { colsOf&amp;lt;Number&amp;gt;() }.into(&quot;key&quot;, &quot;value&quot;)</summary>
321321

322322
<details>
323323
<summary>Input DataFrame: rowsCount = 7, columnsCount = 5</summary>

docs/StardustDocs/snippets/org.jetbrains.kotlinx.dataframe.samples.api.Analyze.columnsFor.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@
204204

205205

206206
<details>
207-
<summary>df.minFor { colsOf&lt;Int&gt;() }</summary>
207+
<summary>df.minFor { colsOf&amp;lt;Int&amp;gt;() }</summary>
208208

209209
<details>
210210
<summary>Input DataFrame: rowsCount = 7, columnsCount = 5</summary>

docs/StardustDocs/snippets/org.jetbrains.kotlinx.dataframe.samples.api.Analyze.countAggregation.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@
225225
</details>
226226
<br>
227227
<details>
228-
<summary>df.pivot { city }.count { age &gt; 18 }</summary>
228+
<summary>df.pivot { city }.count { age &amp;gt; 18 }</summary>
229229

230230
<details>
231231
<summary>Input DataFrame: rowsCount = 7, columnsCount = 5</summary>

docs/StardustDocs/snippets/org.jetbrains.kotlinx.dataframe.samples.api.DataRowApi.conditions.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@
232232
</details>
233233
<br>
234234
<details>
235-
<summary>df.update { weight }.where { index() &gt; 4 &amp;&amp; city != &quot;Paris&quot; }.withValue(50)</summary>
235+
<summary>df.update { weight }.where { index() &amp;gt; 4 &amp;&amp; city != &quot;Paris&quot; }.withValue(50)</summary>
236236

237237
<details>
238238
<summary>Input DataFrame: rowsCount = 7, columnsCount = 5</summary>

docs/StardustDocs/snippets/org.jetbrains.kotlinx.dataframe.samples.api.Join.joinWithMatch.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@
201201

202202

203203
<details>
204-
<summary>other.into(&quot;fullName&quot;).cast&lt;Right&gt;()</summary>
204+
<summary>other.into(&quot;fullName&quot;).cast&amp;lt;Right&amp;gt;()</summary>
205205

206206
<details>
207207
<summary>Input DataFrame: rowsCount = 7, columnsCount = 3</summary>

docs/StardustDocs/snippets/org.jetbrains.kotlinx.dataframe.samples.api.Modify.convert.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@
212212
</details>
213213
<br>
214214
<details>
215-
<summary>df.convert { dfsOf&lt;String&gt;() }.with { it.toCharArray().toList() }</summary>
215+
<summary>df.convert { dfsOf&amp;lt;String&amp;gt;() }.with { it.toCharArray().toList() }</summary>
216216

217217
<details>
218218
<summary>Input DataFrame: rowsCount = 7, columnsCount = 5</summary>

docs/StardustDocs/snippets/org.jetbrains.kotlinx.dataframe.samples.api.Modify.convertTo.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@
203203

204204

205205
<details>
206-
<summary>df.convert { age }.to&lt;Double&gt;()</summary>
206+
<summary>df.convert { age }.to&amp;lt;Double&amp;gt;()</summary>
207207

208208
<details>
209209
<summary>Input DataFrame: rowsCount = 7, columnsCount = 5</summary>
@@ -224,7 +224,7 @@
224224
</details>
225225
<br>
226226
<details>
227-
<summary>df.convert { colsOf&lt;Number&gt;() }.to&lt;String&gt;()</summary>
227+
<summary>df.convert { colsOf&amp;lt;Number&amp;gt;() }.to&amp;lt;String&amp;gt;()</summary>
228228

229229
<details>
230230
<summary>Input DataFrame: rowsCount = 7, columnsCount = 5</summary>

0 commit comments

Comments
 (0)