# strip_dangerous_unicode

> **Function** in `deepagents_code`

📖 [View in docs](https://reference.langchain.com/python/deepagents-code/unicode_security/strip_dangerous_unicode)

Remove known dangerous/invisible Unicode characters from text.

## Signature

```python
strip_dangerous_unicode(
    text: str,
) -> str
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `text` | `str` | Yes | Input text to sanitize. |

## Returns

`str`

Sanitized text with dangerous characters removed.

---

[View source on GitHub](https://github.com/langchain-ai/deepagents/blob/0412009c5441bef8d75a427e1da8909e33ab5b56/libs/code/deepagents_code/unicode_security.py#L164)