Skip to content

Commit 1139a4f

Browse files
docs: add invisible character example to index page
Restores the compelling 'See the invisible' demonstration from the README that shows len() mismatch from hidden Unicode characters. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 17687cc commit 1139a4f

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

docs/index.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,16 @@ navi-sanitize removes invisible attacks from untrusted text before it reaches yo
1919

2020
---
2121

22+
## See the invisible
23+
24+
```python
25+
evil = "system\u200b\u200cprompt" # looks like "systemprompt" but has 2 hidden chars
26+
len(evil) # 14 (not 12!)
27+
clean(evil) # "systemprompt" — hidden chars stripped
28+
```
29+
30+
---
31+
2232
## Features
2333

2434
- **6-stage pipeline** --- null bytes, invisible characters, NFKC normalization, homoglyph replacement, re-NFKC for idempotency, pluggable escaper

0 commit comments

Comments
 (0)