Crate bubble_bath

Crate bubble_bath 

Source
Expand description

§bubble-bath

Small and quick HTML sanitizer

§Usage

Add bubble-bath to your dependencies:

cargo add bubble-bath

Use the library:

let unsanitized = r#"<script>alert('XSS!')</script>"#;
let clean = bubble_bath::clean(unsanitized);

§License

bubble-bath is either licensed under the Apache-2.0 or MIT license, at your choosing.

§Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, shall be licensed as above, without any additional terms or conditions.

For an entry point to the library, check the docs of BubbleBath or clean

Macros§

hashmap
Handy macro to construct a hashmap
hashset
Handy macro to construct a hashset

Structs§

BubbleBath
HTML sanitizer
MemorySettings
Specifies the memory settings for HtmlRewriter.

Enums§

Error
Potential errors

Functions§

clean
Clean provided HTML with a global BubbleBath instance, constructed using BubbleBath::default