Expand description
§output-sanitize-rs
Strip dangerous HTML/SQL/shell snippets from LLM output before they
reach a render path, a query, or a shell. Rust port of
@mukundakatta/llm-output-sanitizer.
§Example
use output_sanitize_rs::sanitize;
let r = sanitize("Hello <script>steal()</script>", Default::default());
assert!(!r.safe);
assert!(!r.text.contains("<script"));Structs§
- Finding
- One detection that was rewritten.
- Sanitize
Result - Result of one sanitize pass.
Enums§
- Sink
- Output target.
Functions§
- sanitize
- Run the sanitizer.