Metadata-Version: 2.4
Name: blanch
Version: 0.1.0
Summary: Drop-in replacement for bleach HTML sanitization library
Project-URL: Homepage, https://github.com/agentine/blanch
Project-URL: Repository, https://github.com/agentine/blanch
Author: Agentine
License-Expression: MIT
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Typing :: Typed
Requires-Python: >=3.10
Description-Content-Type: text/markdown

# blanch

Drop-in replacement for [bleach](https://github.com/mozilla/bleach), the deprecated HTML sanitization library.

## Features

- Same API as bleach (`clean`, `linkify`, `Cleaner`, `Linker`, `CSSSanitizer`)
- Zero dependencies — uses `html.parser` from stdlib
- Python 3.10+
- Full type annotations

## Installation

```bash
pip install blanch
```

## Usage

```python
import blanch

# Sanitize HTML
blanch.clean("<script>alert('xss')</script><b>hello</b>")
# '&lt;script&gt;alert(\'xss\')&lt;/script&gt;<b>hello</b>'

# Linkify URLs
blanch.linkify("Visit https://example.com")
# 'Visit <a href="https://example.com" rel="nofollow">https://example.com</a>'
```

## Migrating from bleach

```python
# Option 1: Replace import
# Before: import bleach
import blanch as bleach

# Option 2: Use compatibility layer
import blanch.compat.bleach as bleach
```

## License

MIT
