All fixtures · Hostile input (each one attack) · hostile/07-html-in-part-text.dh.md
Source
---
title: HTML inside every part's text
expect: every part shows the text as text
---
```terminal title="<img src=x onerror=alert(1)>"
$ echo "<script>alert(1)</script>"
<script>alert(2)</script>
```
```filetree
src/ # <img src=x onerror=alert(1)>
a.ts (new) # <script>alert(1)</script>
```
```chart
kind: bar
title: "<img src=x onerror=alert(1)>"
x: ["<script>a</script>", "b"]
series:
- name: "<b onmouseover=alert(1)>s</b>"
data: [1, 2]
```
```tierlist title="<script>alert(1)</script>"
S: <img src=x onerror=alert(1)>
A: plain
```
```codewalk
@file a.ts
const a = "<script>alert(1)</script>";
@step a.ts focus=1
A note with <img src=x onerror=alert(1)> and <script>alert(2)</script>.
```
```animation
box a "<img src=x onerror=alert(1)>"
box b "<script>alert(2)</script>"
a -> b
@step Send
send "<svg onload=alert(3)>" a -> b
```
LLM view
---
title: HTML inside every part's text
source: hostile/07-html-in-part-text.dh.md
---
<!-- Made by dh llm from the source; nobody edits this file. -->
```terminal
$ echo "<script>alert(1)</script>"
<script>alert(2)</script>
```
```filetree
src/ # <img src=x onerror=alert(1)>
a.ts (new) # <script>alert(1)</script>
```
Chart (bar): <img src=x onerror=alert(1)>
| x | <b onmouseover=alert(1)>s</b> |
| --- | --- |
| <script>a</script> | 1 |
| b | 2 |
Tier list: <script>alert(1)</script> (top tier first)
S: (empty)
A: plain
B: (empty)
C: (empty)
D: (empty)
```codewalk
@file a.ts
const a = "<script>alert(1)</script>";
@step a.ts focus=1
A note with <img src=x onerror=alert(1)> and <script>alert(2)</script>.
```
Animation, 1 steps. Starts with: box a "<img src=x onerror=alert(1)>"; box b "<script>alert(2)</script>". Connected: a -> b.
1. Send
a -> b: <svg onload=alert(3)><img src=x onerror=alert(1)>
$echo "<script>alert(1)</script>"
<script>alert(2)</script>
$
Explorer
- <img src=x onerror=alert(1)>
- a.tsnew<script>alert(1)</script>
<img src=x onerror=alert(1)>
Show the numbers as a table
| <b onmouseover=alert(1)>s</b> | |
|---|---|
| <script>a</script> | 1 |
| b | 2 |
<script>alert(1)</script>
S
A
plain
B
C
D
a.ts
const a = "<script>alert(1)</script>";
1A note with <img src=x onerror=alert(1)> and <script>alert(2)</script>.
1 / 1
Animation, 1 steps. Starts with: box a "<img src=x onerror=alert(1)>"; box b "<script>alert(2)</script>". Connected: a -> b. 1. Send a -> b: <svg onload=alert(3)>
1Send
1 / 1