Expand description
Filters SVG files to make them safe to host anywhere.
use svg_hush::*;
let mut file = "<svg xmlns='http://www.w3.org/2000/svg' />".as_bytes();
let mut filter = Filter::new();
filter.set_data_url_filter(data_url_filter::allow_standard_images);
let mut out = Vec::new();
filter.filter(&mut file, &mut out)?;Modules§
- data_
url_ filter - Optionally, you can allow or modify
data:URLs.
Structs§
- Filter
- The main entry point. Call
Filter::new
Enums§
- FError
- XML parsing error, I/O error, etc.